Some WinRT tests
winrt2.prg
winrt2.prg
#include "FiveWin.ch"
function Main()
local pString, nLength
RoInitialize( 1 )
WindowsCreateString( AnsiToWide( "Hello" ), Len( AnsiToWide( "Hello" ) ), @pString )
WindowsGetStringRawBuffer( pString, @nLength )
MsgInfo( nLength )
WindowsDeleteString( pString )
RoUninitialize()
return nil
DLL FUNCTION RoInitialize( nType AS LONG ) AS LONG PASCAL LIB "combase.dll"
DLL FUNCTION RoUninitialize() AS VOID PASCAL LIB "combase.dll"
DLL FUNCTION WindowsCreateString( cWideText AS LPSTR, nLength AS LONG, @pString AS PTR ) ;
AS LONG PASCAL LIB "combase.dll"
DLL FUNCTION WindowsDeleteString( pString AS PTR ) AS LONG PASCAL LIB "combase.dll"
DLL FUNCTION WindowsGetStringRawBuffer( pString AS PTR, @nLength AS LONG ) AS LPSTR PASCAL LIB "combase.dll"