Z
Zoltan
OS : Windows XP Professional
Environment : MS Visual Studio 2005
Language : C#
I am trying to call an unmanaged function that is in a dll written in
C++. I did call the unmanaged fucntions already and i know almost
everything. My problem is that i do not have those datatypes under C#
that i had under C++. For example :
DWORD etCreateTalker (
LPCTSTR lpszReaderName,
LPHTALKER phTalker,
DWORD dwFlags
);
Neither LPCTSTR nor LPHTALKER are referencable from C#. If i put a
simple string instead of these types the function will be called
without a single error, but then i do not know the information because
of inproper casting, for example, instead of color, i get a 2 digit
number.....
To my best, the best would be if i re-declare these datatypes under C#
so i will have proper casting ?! Or could i import "3rd party"
datatypes from the dll into C# ?
I have put a similar question on the web before and i was told what is
what and so this would be my last question to make this work. Microsoft
advised me a book on API/COM but i hope that i don't need to read an
arm thick book to complete the answer.
Any help is greatly appreciated.
Zoltan.
Environment : MS Visual Studio 2005
Language : C#
I am trying to call an unmanaged function that is in a dll written in
C++. I did call the unmanaged fucntions already and i know almost
everything. My problem is that i do not have those datatypes under C#
that i had under C++. For example :
DWORD etCreateTalker (
LPCTSTR lpszReaderName,
LPHTALKER phTalker,
DWORD dwFlags
);
Neither LPCTSTR nor LPHTALKER are referencable from C#. If i put a
simple string instead of these types the function will be called
without a single error, but then i do not know the information because
of inproper casting, for example, instead of color, i get a 2 digit
number.....
To my best, the best would be if i re-declare these datatypes under C#
so i will have proper casting ?! Or could i import "3rd party"
datatypes from the dll into C# ?
I have put a similar question on the web before and i was told what is
what and so this would be my last question to make this work. Microsoft
advised me a book on API/COM but i hope that i don't need to read an
arm thick book to complete the answer.
Any help is greatly appreciated.
Zoltan.