M
Mike
I am just getting in .Net, how do you expose a C++/CLR class function
so that in VB.NET its prototype is:
function XYZ(byval p as integer, byval s as string) as boolean
I have this, but the compiler doesn't like it:
namespace MyAPICLR {
public ref class MyClass
{
...
static bool XYZ(int p, const String^ s)
{
return ::XYZ(HWND)p,s); << How do typecast this?
}
};
}
The C++ class XYZ function wraps a imported lib function ::XYZ whose
WIN32 C/C++ prototype is:
BOOL APIENTRY XYZ(HWND p, const char *s);
I'm sorry, I know its s damn simple. I can't find an example. :-(
Why can't the compiler see:
static bool XYZ(int p, const char *s)
and know that the reference exposure is a const non-byref System::String?
--
so that in VB.NET its prototype is:
function XYZ(byval p as integer, byval s as string) as boolean
I have this, but the compiler doesn't like it:
namespace MyAPICLR {
public ref class MyClass
{
...
static bool XYZ(int p, const String^ s)
{
return ::XYZ(HWND)p,s); << How do typecast this?
}
};
}
The C++ class XYZ function wraps a imported lib function ::XYZ whose
WIN32 C/C++ prototype is:
BOOL APIENTRY XYZ(HWND p, const char *s);
I'm sorry, I know its s damn simple. I can't find an example. :-(
Why can't the compiler see:
static bool XYZ(int p, const char *s)
and know that the reference exposure is a const non-byref System::String?
--