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
Interesting question. I wrote below blog article for your information. Although it is not a perfect solution, it can solve the problem.
msce mvba brandinfo get brandinfo by using mvba
Answer Verified By: Julia Frid
Thank You very much. Very elegant solution.