What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI
I'm attempting to call the entry point using the following VB definition:
function GenRegCode( RegStr : Widestring; RegOptions, SerialExpireDays, RegExpire, RegExpireDays, RegExpireMonths, RegExpireYears : Integer; var Serial : Widestring) : LongBool; stdcall;
I'm getting an AccessViolationException error. The string Serial is set to 1024 spaces -- much longer than the maximum string length that will be returned, which is 24. Do I have the VB data types defined correctly? Could this have something to do with a pointer to a string, versus the string itself?
<DllImport("C:\Windows\SysWOW64\xxx.dll", EntryPoint:="GenRegCode", SetLastError:=True, _ CharSet:=CharSet.Auto, ExactSpelling:=True, _ CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function fGenRegCodeVB( _ ByVal RegPassword As String, _ ByVal RegOptions As Long, _ ByVal SerialExpireDays As Long, _ ByVal RegExpire As Long, _ ByVal RegExpireDay As Long, _ ByVal RegExpireMonth As Long, _ ByVal RegExpireYear As Long, _ ByRef Serial As String) As Boolean End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.