I'd like have a file with all of my Win32API stuff in it:
namespace myStuff.Interop Types
{
using HBITMAP = System.IntPtr;
using HWND = System.IntPtr;
public struct POINT
{
public int x;
public int y;
}
}
and then be able to do something like this in another file:
using myStuff.Interop Types;
namespace myStuff.myProje ct
{
[DllImport( "user32.dll " )]
static extern bool SomeFunc( HWND hWnd, HBITMAP hBitmap, POINT point );
[...]
}
which doesn't work since the 'using' aliases from the first file aren't
visible outside that compilation unit. Is there another way to do this?
Michael Roper
namespace myStuff.Interop Types
{
using HBITMAP = System.IntPtr;
using HWND = System.IntPtr;
public struct POINT
{
public int x;
public int y;
}
}
and then be able to do something like this in another file:
using myStuff.Interop Types;
namespace myStuff.myProje ct
{
[DllImport( "user32.dll " )]
static extern bool SomeFunc( HWND hWnd, HBITMAP hBitmap, POINT point );
[...]
}
which doesn't work since the 'using' aliases from the first file aren't
visible outside that compilation unit. Is there another way to do this?
Michael Roper
Comment