VB is not thread-safe, and barely reentrant.
Take a read through http://www.powerbasic.com/support/te...threading3.asp
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Announcement
Collapse
No announcement yet.
Callback is killing my VB prog?
Collapse
X
-
FIXED!
The problem was - I was using Call Dword address& from within another thread - apparently this is a no-no! At least under Win2k..
When I moved that statement back to the main function (in the 'parent' thread), it worked perfectly
seeing as i've cut everything down to the basics to figure out what was happening, ill put the code up on the Source Code forum
Thanks for offering assistance Knuth, I appreciate it very much
------------------
Leave a comment:
-
Wayne,
I guess we need to see some of your code in order to figure out what's going on.
Knuth
------------------
http://www.softAware.de
Leave a comment:
-
Callback is killing my VB prog?
My VB prog is calling my PB dll, and the PB DLL declaration is something like this:
SUB MAILFILE(BYVAL lngCallBack&) EXPORT
and in that, after it's done its stuff, it calls the callback like this:
Call DWord lngCallBack&
I'm declaring it like this from my VB prog:
Public Declare Sub MAILFILE Lib "mailfile.dll" (ByVal xCallBack As Long)
It works _perfectly_ under NT, but not under Windows 2000 ... under Win2K , after the file has been mailed and the callback occurs,
my VB program dies - the Win2K fatal error message being "This program has generated errors"
Anyone have any ideas?
------------------
Tags: None
Leave a comment: