Passing NULL value to a DLL

  • Thread starter Thread starter Michael Tissington
  • Start date Start date
M

Michael Tissington

I have a DLL written in C++ and I'm calling it from C#

One of the parameters for a function in the DLL is a DATE value or NULL.

How do I pass NULL to my DLL from C#?
 
Michael,
Then how do I pass it as a DateTime OR null

What kind of DLL is it you're working with; managed, COM or a plain
old DLL with exported entry points?

If the latter (i.e. you're using DllImport), just write two overloads,
one where the parameter is an IntPtr and one where its a date.



Mattias
 
Hi Michael ,
Could you show me the type of each parameter in the function?

Regards,
WL

Michael Tissington said:
Then how do I pass it as a DateTime OR null
 
Back
Top