Just trying to get some more practice. The code below doesn't fail, but obviously not the correct way to go about creating a GUID from .NET
I wasn't able to implement a System.GUID class so I went the CLRType route. Most of the code I looked at seemed to imply NewGuid().Guid.ToString() was the way to go, but I don't see how to go about calling the method.
;***************************************************************************
;** Reverse GUID
;**
;** Reference:
;** REQUIRES WinBatch 2013A or newer & CLR version 4.0
;**
;** Stan LittleField, June 29,2013
;***************************************************************************
If Version( )< '2013A'
Pause('Notice', 'Need 2013A or Newer Version of WinBatch')
Exit
EndIf
ObjectClrOption( 'use', 'System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' )
oGUID = ObjectClrType('System.GUID','Guid') ;having trouble with 2nd parameter
;cGUID = oGUID.NewGuid().Guid
Message("",ObjectTypeGet(oGUID))
;code to reverse the GUID
oGUID=0
Exit