May 01, 2024, 02:48:54 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


CreateObject?

Started by J B Wood (Zumwalt), October 20, 2006, 03:10:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mike Stefanik

November 20, 2006, 07:36:36 PM #50 Last Edit: November 20, 2006, 07:40:01 PM by Mike Stefanik
Just so you know, the source is incomplete (lots of references to things that aren't included in the zip file) and the executable GP faults on Windows XP (at least on my system).

It looks like a wild pointer, trying to read memory at address 0xffffffef. Also looks like the stack is corrupted.
Mike Stefanik
www.catalyst.com
Catalyst Development Corporation

sapero

The included source is only the real stuff - main program and small typelib helper class set, It uses the windows headers so if i would upload all, the zip would be 3 MB.
Mike - when and what crashes? The output executable can crash right after opening main window, the atl ocx container has an bug.
After replacing the atl with custom ocx container it was running ok.
Main program can crash by combobox subclass proc - replaced CallWindowProc with direct call to combo wndproc, it works on XP but needs more initialization.

I'm running two different XP - on laptop i like to code, desktop is connected to internet but has ultra slow P4 with L4 dead (2Y old).
First time the program was tested on desktop conputer - no controls found :), so XP is not equal XP.
The actual version has GDI leaks in OnDrawItem, and some heap leaks in writer part.

Has anyone tested this on older systems like 98/ME?

sapero

I've uploaded newer version with fixed leaks, included resources and internal extras like unicode functions + extended Sean's stringify tools.

And here you find the custom ocx container - it uses a lot of com classes, but is very simple. Can host only windowed controls (with IOleWindow).
Works with browser, macromedia flash realplayer, wmp, system-monitor... and is ready for extending for new interfaces without recompilling.
Supports also "external" for javascript, and drag-drop extensions.
The host is implemented inside CInvoker2 and is initialized with CInvoker2::Create2

While running control "Microsoft Forms 2.0 MultiPage" hosted by ATL - it will crash, but hosted with this tool - will run propertly.

Mike Stefanik

It still crashes on my system, right as it's loading up. The dialog displays, and as soon as the progress bar is hidden, it GP faults. It looks like the problem may be somewhere in EnumControlsThread(), after you hide the IDC_PROGRESS control. Offhand, the first I noticed is that you're not initializing the m_bitmaps member to a value, and you're not checking to see if it's actually valid when you start iterating through that loop. In any case, like I said in my previous post, it looks like you have a wild pointer in there.

Mike Stefanik
www.catalyst.com
Catalyst Development Corporation

JR

There is a buggy versiol of ATL.DLL that crashes in XP. I use ATL71.DLL that works fine.

Mike Stefanik

In this particular case the stack trace doesn't show calls to ATL.dll (nothing like AtlModuleLoadTypeLib, etc.), it's actually crashing inside User32.dll, although the stack does look munged.
Mike Stefanik
www.catalyst.com
Catalyst Development Corporation

sapero

November 21, 2006, 12:16:13 PM #56 Last Edit: November 24, 2006, 02:35:05 AM by sapero
The main class is created with new() so all is initialized to NULL, i know the new() function uses GlobalAlloc with GMEM_ZEROINIT flag, same with AllocHeap.
Mike, you can fake the last selected control to "nothing" by setting HKCU\Software\Sapero\OcxWrapÂÃ,  LastControlClsid=16* 0xFF
After enumerating it will not find/select this clsid, and will not load anything

I have created a debug version (compile capable):
ocxwrap_debug: http://www.mytempdir.com/1075162
And before Paul updates new sdk includes, grab the nevest pack from http://rapidshare.com/files/4610026/aurora.include.21.11.2006.zip.html
Open the project and start debug session.

Ah so, unpack this project to c:\debug, it was here compiled
And lol, before you recompile this - remove parameters from main() and the 'if' - you do not have modified startup library :)

Shannara

I think that link might be down. I couldnt find a download on the resulting page :( The link near the top of this thread page's exe crashes all the time. At the beginning when it's loading the top combobox, is when it happens. Have anybody got this working? Or have resulting code when they run this against the msscript.ocx control on their system?
Love is staying up all night with a sick child, or a healthy adult.