Hello,I wantto check company's name (VBA macro) with mdlLicense_getStrings() function, but it's all time crash. What I'm doing wrong?
Option Explicit Private Declare PtrSafe Sub mdlLicense_getStrings Lib "stdmdlbltin.dll" (ByRef theInfoStrings As brandInfo) Private Declare PtrSafe Function mdlLicense_isRegisteredProduct Lib "stdmdlbltin.dll" () As Long Public dblInterval As Double Type brandInfo theUN As String * 64 theUO As String * 64 theComputerName As String * 32 End Type Public Function IsMicroStationRegistered() As Boolean IsMicroStationRegistered = (0 <> mdlLicense_isRegisteredProduct()) End Function Sub CheckCN() Dim licInfo As brandInfo If IsMicroStationRegistered() Then Debug.Print "MicroStation is registered" Else Debug.Print "MicroStation is not registered" End If mdlLicense_getStrings licInfo '''here crash ''MsgBox licInfo.theComputerName, vbInformation, "License Check" End Sub
CE Update 16 v 10.16.03.11
Regards,Julia
Other option would be to read Company name from DGN properties. Only not clear how to update this before checking as save or save settings doesn't update it, it seems is updated only when new file is created.