Get first chance exception when calling ReleaseDriver()

35 views
Skip to first unread message

zwi...@gmail.com

unread,
Sep 23, 2014, 3:43:47 PM9/23/14
to velmex-...@googlegroups.com
Hi,

I'm trying to run the Visual C 6 example in a VS2008 C++ environment.
Every time the code encounters a first chance exception ("An invalid handle was specified") when calling "ReleaseDriver()". It seems that something happens when the "FreeLibrary(HwndDriver)" try to unload the DLL file.

So I test a simple win32 console:

#include "stdafx.h"
#include "VxmDriver.h"

int _tmain(int argc, _TCHAR* argv[])
{
HINSTANCE HwndDriver = LoadLibrary("VxmDriver.dll");
FreeLibrary(HwndDriver);
return 0;
}
#######################

But the code throws the same exception when calling FreeLibrary to unload DLL as well.

Is there a way to solve this problem?

Thanks!

Velmex Suppt

unread,
Sep 23, 2014, 3:59:55 PM9/23/14
to zwi...@gmail.com, velmex-...@googlegroups.com
What value do you get for HwndDriver when you call
HwndDriver = LoadLibrary("VxmDriver.dll");

???
-------- Original Message --------
Subject: Get first chance exception when calling ReleaseDriver()
Date: Tue, 23 Sep 2014 12:43:47 -0700 (PDT)
From: zwi...@gmail.com
Reply-To: velmex-...@googlegroups.com
To: velmex-...@googlegroups.com


Hi,

I'm trying to run the Visual C 6 example in a VS2008 C++ environment.
Every time the code encounters a first chance exception ("An invalid handle was specified") when calling "ReleaseDriver()". It seems that something happens when the "FreeLibrary(HwndDriver)" try to unload the DLL file.

So I test a simple win32 console:

#include "stdafx.h"
#include "VxmDriver.h"

int _tmain(int argc, _TCHAR* argv[])
{
     HINSTANCE HwndDriver = LoadLibrary("VxmDriver.dll");
     FreeLibrary(HwndDriver);
     return 0;
}
#######################

But the code throws the same exception when calling FreeLibrary to unload DLL as well.

Is there a way to solve this problem?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups "Velmex Controls" group.
To unsubscribe from this group and stop receiving emails from it, send an email to velmex-contro...@googlegroups.com.
To post to this group, send email to velmex-...@googlegroups.com.
Visit this group at http://groups.google.com/group/velmex-controls.
For more options, visit https://groups.google.com/d/optout.



zwi...@gmail.com

unread,
Sep 23, 2014, 4:25:51 PM9/23/14
to velmex-...@googlegroups.com, zwi...@gmail.com, sup...@velmex.com
Hi,

It returns HwndDriver Value 0x001c0000{unused=678477}.
Thanks.

Best

在 2014年9月23日星期二UTC-7下午12时59分55秒,Velmex Suppt写道:
Reply all
Reply to author
Forward
0 new messages