M
M0
Hello,
I am trying to access a function in a 3rd party dll through dllimport
there is a function in the dll called
"epNormalLaunchApp(UInt32 creator);"
and the creator ids can be:
/*
* Common app creator ID's from the header file evc++ def's
*/
#define EP_APP_RX 'nc-2'
#define EP_APP_DX 'nc52'
#define EP_APP_ID 'nc43'
#define EP_APP_TABLE 'ep23'
#define EP_APP_LAB 'ep24'
#define EP_APP_MEDTOOLS 'eMPL'
but the dll crashes when I try to convert the hex of one of these
creator id's into a UInt32 and pass it to the dll, It doesn't crash in
my program see code below but It does crash in the dll with an
exceptioncode of 0x80000002. I am missing something with regards to
the conversion I think but cannot figure out what it is. Any help
would be much appreciated.
Thanks
Mo
---begin code---
<DllImport("epLauncherLib.dll", CharSet:=CharSet.Unicode,
EntryPoint:="epNormalLaunchApp")> _
Public Function MyFunc(ByVal creator As UInt32) As UInt32
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim creator As UInt32
creator = System.Convert.ToUInt32(&H6E633532)'nc52 in hex
MyFunc(creator)
End Sub
---end code---
I am trying to access a function in a 3rd party dll through dllimport
there is a function in the dll called
"epNormalLaunchApp(UInt32 creator);"
and the creator ids can be:
/*
* Common app creator ID's from the header file evc++ def's
*/
#define EP_APP_RX 'nc-2'
#define EP_APP_DX 'nc52'
#define EP_APP_ID 'nc43'
#define EP_APP_TABLE 'ep23'
#define EP_APP_LAB 'ep24'
#define EP_APP_MEDTOOLS 'eMPL'
but the dll crashes when I try to convert the hex of one of these
creator id's into a UInt32 and pass it to the dll, It doesn't crash in
my program see code below but It does crash in the dll with an
exceptioncode of 0x80000002. I am missing something with regards to
the conversion I think but cannot figure out what it is. Any help
would be much appreciated.
Thanks
Mo
---begin code---
<DllImport("epLauncherLib.dll", CharSet:=CharSet.Unicode,
EntryPoint:="epNormalLaunchApp")> _
Public Function MyFunc(ByVal creator As UInt32) As UInt32
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim creator As UInt32
creator = System.Convert.ToUInt32(&H6E633532)'nc52 in hex
MyFunc(creator)
End Sub
---end code---