Is there a simple way to test a DX9 driver in BMax

BlitzMax Forums/BlitzMax Programming/Is there a simple way to test a DX9 driver in BMax

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

OK the examples won't compile in BMax 1.30. They fail on this line

wc.hInstance=GetModuleHandleA(0)


in the Create() function in DX9Graphics.bmx:

	Function Create:TD3D9Graphics( width:Int,height:Int,depth:Int,hertz:Int,flags:Int )
		Global _reg : Int
		If Not _reg : Int
			Local wc:WNDCLASS=New WNDCLASS
			wc.hInstance=GetModuleHandleA(0)
			wc.lpfnWndProc=WndProc
			wc.hCursor=LoadCursorA( Null,Byte Ptr IDC_ARROW )
			wc.lpszClassName=_DX9GRAPHICSEXWINDOWCLASS
			RegisterClassA( wc )
			_reg=True
		EndIf

		Local hinst:Int=GetModuleHandleA(0)
		Local title:Byte Ptr=AppTitle.ToCString()
	
		Local hwnd:Int
		If depth
			hwnd=CreateWindowExA( 0,_DX9GRAPHICSEXWINDOWCLASS,title,WS_VISIBLE|WS_POPUP,0,0,width,height,0,0,hinst,Null )
		Else
			Local style:Int=WS_VISIBLE|WS_CAPTION|WS_SYSMENU |WS_SIZEBOX 
			Local rect :TRect = TRect.Create(32,32,width+32,height+32)
			AdjustWindowRect Int Ptr Byte Ptr rect,style,0
			width=rect.Width()
			height=rect.Height()
			hwnd=CreateWindowExA( 0,_DX9GRAPHICSEXWINDOWCLASS,title,style,rect._Left,rect._Top,width,height,0,0,hinst,Null )
		EndIf

		MemFree title

		If Not hwnd Return Null

		Return New TD3D9Graphics._Create(hwnd ,width,height,depth,hertz,flags)
	End Function


with this error:

Compile Error: Unable to convert from 'Int' to 'Byte Ptr'

Does anyone know how to resolve this please? thanks.