Hi all,
I have an API, which is written in C. I am trying
to invoke that API in C#, but getting an error as
"Object reference is not set to an instance of the
object".
this is API "C" declaration:
int PBFNGetCityList(char *cityExpr,
char *state,
int count,
pDbxSearchDataDef *returnData);
and the code that I am writing in C# is
[DllImport("PBFN.dll",CharSet = CharSet.Ansi,
ExactSpelling = true,CallingConvention =
CallingConvention.Cdecl)]
public static extern int PBFNGetCityList(
[MarshalAs(UnmanagedType.LPStr)]
string cityExpr,
[MarshalAs(UnmanagedType.LPStr)]
string state,
int count,
ref PBFNDbxSearchDataDef returnGetCityListdata);
Please help me and suggest me with the solution.
Thanks in advance..
James.
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/