|
-
September 30th, 2005, 04:04 AM
#1
sqlAllocEnv APi Not Working
Hi All,
I have the following declaration:
<DllImport("odbc32.dll", BestFitMapping:=True, CallingConvention:=CallingConvention.ThisCall, _
CharSet:=CharSet.Unicode, EntryPoint:="SQLAllocEnv", ExactSpelling:=True)> _
Public Shared Function SQLAllocEnv(ByVal phenv As Integer) As Short
'leave this function empty
End Function
I cannot seem to get this to work.
If I have CallingConvention set to StdCall, then I receive a return code of -1.
If I set it to ThisCall, I receive a return code of 0. Any other value either gives -1 or crashes.
In all cases the handle is always 0 ??? So the above is the nearest I have got to making it work. Anybody have any ideas?
If you find my answers helpful, dont forget to rate me 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|