Rev 94 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 94 | Rev 102 | ||
---|---|---|---|
Line 719... | Line 719... | ||
719 | ret: BOOL; |
719 | ret: BOOL; |
720 | buf: array[0..cchBufferSize-1] of WideChar; |
720 | buf: array[0..cchBufferSize-1] of WideChar; |
721 | begin |
721 | begin |
722 | if Assigned(fDescribeOwnStatusCodeW) then |
722 | if Assigned(fDescribeOwnStatusCodeW) then |
723 | begin |
723 | begin |
724 | ZeroMemory(@buf, cchBufferSize); |
724 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
725 | ret := fDescribeOwnStatusCodeW(@buf, cchBufferSize, statusCode, lngID); |
725 | ret := fDescribeOwnStatusCodeW(@buf, cchBufferSize, statusCode, lngID); |
726 | if ret then |
726 | if ret then |
727 | begin |
727 | begin |
728 | result := PWideChar(@buf); |
728 | result := PWideChar(@buf); |
729 | Exit; |
729 | Exit; |
Line 928... | Line 928... | ||
928 | begin |
928 | begin |
929 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnCheckLicense, dllFile])); |
929 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnCheckLicense, dllFile])); |
930 | Exit; |
930 | Exit; |
931 | end; |
931 | end; |
932 | 932 | ||
933 | ZeroMemory(@buf, cchBufferSize); |
933 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
934 | statusCode := fPluginNameW(@buf, cchBufferSize, lngID); |
934 | statusCode := fPluginNameW(@buf, cchBufferSize, lngID); |
935 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginName := PWideChar(@buf) |
935 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginName := PWideChar(@buf) |
936 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginName := '' |
936 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginName := '' |
937 | else |
937 | else |
938 | begin |
938 | begin |
939 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginNameW, dllFile])); |
939 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginNameW, dllFile])); |
940 | Exit; |
940 | Exit; |
941 | end; |
941 | end; |
942 | 942 | ||
943 | ZeroMemory(@buf, cchBufferSize); |
943 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
944 | statusCode := fPluginVendorW(@buf, cchBufferSize, lngID); |
944 | statusCode := fPluginVendorW(@buf, cchBufferSize, lngID); |
945 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginVendor := PWideChar(@buf) |
945 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginVendor := PWideChar(@buf) |
946 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginVendor := '' |
946 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginVendor := '' |
947 | else |
947 | else |
948 | begin |
948 | begin |
949 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginVendorW, dllFile])); |
949 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginVendorW, dllFile])); |
950 | Exit; |
950 | Exit; |
951 | end; |
951 | end; |
952 | 952 | ||
953 | ZeroMemory(@buf, cchBufferSize); |
953 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
954 | statusCode := fPluginVersionW(@buf, cchBufferSize, lngID); |
954 | statusCode := fPluginVersionW(@buf, cchBufferSize, lngID); |
955 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginVersion := PWideChar(@buf) |
955 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FPluginVersion := PWideChar(@buf) |
956 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginVersion := '' |
956 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FPluginVersion := '' |
957 | else |
957 | else |
958 | begin |
958 | begin |
959 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginVersionW, dllFile])); |
959 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnPluginVersionW, dllFile])); |
960 | Exit; |
960 | Exit; |
961 | end; |
961 | end; |
962 | 962 | ||
963 | ZeroMemory(@buf, cchBufferSize); |
963 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
964 | statusCode := fIdentificationMethodNameW(@buf, cchBufferSize); |
964 | statusCode := fIdentificationMethodNameW(@buf, cchBufferSize); |
965 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FIdentificationMethodName := PWideChar(@buf) |
965 | if statusCode.wCategory = UD2_STATUSCAT_SUCCESS then Plugin.FIdentificationMethodName := PWideChar(@buf) |
966 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FIdentificationMethodName := '' |
966 | else if statusCode.wCategory = UD2_STATUSCAT_NOT_AVAIL then Plugin.FIdentificationMethodName := '' |
967 | else |
967 | else |
968 | begin |
968 | begin |
969 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnIdentificationMethodNameW, dllFile])); |
969 | Errors.Add(Format(LNG_METHOD_FAILURE, [_ErrorLookup(statusCode), mnIdentificationMethodNameW, dllFile])); |
970 | Exit; |
970 | Exit; |
971 | end; |
971 | end; |
972 | 972 | ||
973 | ZeroMemory(@buf, cchBufferSize); |
973 | ZeroMemory(@buf, cchBufferSize*SizeOf(WideChar)); |
974 | statusCode := UD2_STATUS_FAILURE_NO_RETURNED_VALUE; // This status will be used when the DLL does not return anything (which is an error by the developer) |
974 | statusCode := UD2_STATUS_FAILURE_NO_RETURNED_VALUE; // This status will be used when the DLL does not return anything (which is an error by the developer) |
975 | if useDynamicData then |
975 | if useDynamicData then |
976 | begin |
976 | begin |
977 | statusCode := fDynamicIdentificationStringW(@buf, cchBufferSize, PWideChar(dynamicData)); |
977 | statusCode := fDynamicIdentificationStringW(@buf, cchBufferSize, PWideChar(dynamicData)); |
978 | end |
978 | end |