Can I use the Platform SDK with C#?

  • Thread starter Thread starter Paul J. Hurley
  • Start date Start date
P

Paul J. Hurley

There are one or two Platform SDK commands I would like to use in my C#
project (GetAsyncKeyState for example). I assume the SDK function will be
"unsafe", but are there any other special issues I should be aware of?

Thanks
Paul
 
Hi Paul J. Hurley,

If there is any particular dll you can call, use platform invocation with the keyword dllimport.

To make conversion safely from unmanaged to managed, use marshalling.

Well it is not necessary that you have to code unsafe or pointers in platfrom invocation.

Good Luck!
 
Back
Top