Hi!
I would like to call a c-function with the following signature:
STATUS LNPUBLIC NSFDbOpen (const char far *PathName, DBHANDLE far *rethDB);
The paremeter PathName is the path to a Lotus Notes database. My PInvoke
declaration looks like this (VB.NET):
<DllImport("nnotes.dll")> Private Shared Function _
NSFDbOpen( _
ByVal PathName As String, _
ByRef rethDb As IntPtr _
) As UInteger
End Function
Calling this functin works fine for two pathes, that have no
special-characters like ä,ü etc in them. When calling it with a path
including an ü-character, i get an error, claiming, no file was found.
Additionally I found a blog where someone solved the problem by changing his
(non-.NET)-VB-Code like this:
Declare Function W32_NSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" ( Byval
dbName As Lmbcs String, hDb As Long) As Integer
LINK:
http://www.theoldgit.com/redloh/TheO...%20LotusScript
He included the Lmbcs in the declaration and succeeded.
I don't know, what this means as I am not very fit in VB.
LMBCS is declared in the Notes C-API like this:
typedef unsigned char LMBCS;
My question is:
Can someone of you gather from the methods signature, how I have to modify
the Marshaling to correctly pass Strings including special characters beyong
ASCI, so that the C Api will be able to work with it?
Regards,
Markward