Passing NULL value to a DLL

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#?
 
M

Mattias Sjögren

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
 
W

WL\(fromSJTU\)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top