Browse Source

+ Compiles on win32 also now

michael 25 years ago
parent
commit
61192ad683
3 changed files with 44 additions and 39 deletions
  1. 0 37
      rtl/objpas/varutils.inc
  2. 39 0
      rtl/objpas/varutils.pp
  3. 5 2
      rtl/win32/varutils.inc

+ 0 - 37
rtl/objpas/varutils.inc

@@ -20,43 +20,6 @@
   ---------------------------------------------------------------------}
   ---------------------------------------------------------------------}
   
   
 
 
-Resourcestring
-
-  SNoWidestrings = 'No widestrings supported';
-  SNoInterfaces  = 'No interfaces supported';
-
-Procedure NoWidestrings;
-
-begin
-  Raise Exception.Create(SNoWideStrings);
-end;
-
-Procedure NoInterfaces;
-
-begin
-  Raise Exception.Create(SNoInterfaces);
-end;
-
-Constructor EVariantError.CreateCode (Code : longint);
-
-begin
-  ErrCode:=Code;
-end;
-  
-Procedure VariantTypeMismatch;
-  
-begin
-  Raise EVariantError.CreateCode(VAR_TYPEMISMATCH);
-end;
-
-Function ExceptionToVariantError (E : Exception): HResult;
-
-begin
-  If E is EoutOfMemory then
-    Result:=VAR_OUTOFMEMORY
-  else
-    Result:=VAR_EXCEPTION;
-end;
 
 
 Procedure SetUnlockResult (P : PVarArray; Res : HResult);
 Procedure SetUnlockResult (P : PVarArray; Res : HResult);
 
 

+ 39 - 0
rtl/objpas/varutils.pp

@@ -165,6 +165,45 @@ const
 
 
 Implementation
 Implementation
 
 
+Resourcestring
+
+  SNoWidestrings = 'No widestrings supported';
+  SNoInterfaces  = 'No interfaces supported';
+
+Procedure NoWidestrings;
+
+begin
+  Raise Exception.Create(SNoWideStrings);
+end;
+
+Procedure NoInterfaces;
+
+begin
+  Raise Exception.Create(SNoInterfaces);
+end;
+
+Constructor EVariantError.CreateCode (Code : longint);
+
+begin
+  ErrCode:=Code;
+end;
+  
+Procedure VariantTypeMismatch;
+  
+begin
+  Raise EVariantError.CreateCode(VAR_TYPEMISMATCH);
+end;
+
+Function ExceptionToVariantError (E : Exception): HResult;
+
+begin
+  If E is EoutOfMemory then
+    Result:=VAR_OUTOFMEMORY
+  else
+    Result:=VAR_EXCEPTION;
+end;
+
+
 {$i varutils.inc}
 {$i varutils.inc}
 
 
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------

+ 5 - 2
rtl/win32/varutils.inc

@@ -30,7 +30,7 @@ function VariantInit(var Varg: TVarData): HRESULT; stdcall;external oleaut;
 
 
 {  Variant array functions }
 {  Variant array functions }
 
 
-function SafeArrayAccessData(psa: PVarArray; var Data: Pointer): HRESULT; stdcall;external oleaut;
+function SafeArrayAccessData(psa: PVarArray; var ppvData: Pointer): HRESULT; stdcall;external oleaut;
 function SafeArrayAllocData(psa: PVarArray): HRESULT; stdcall;external oleaut;
 function SafeArrayAllocData(psa: PVarArray): HRESULT; stdcall;external oleaut;
 function SafeArrayAllocDescriptor(DimCount: Integer; var psa: PVarArray): HRESULT; stdcall;external oleaut;
 function SafeArrayAllocDescriptor(DimCount: Integer; var psa: PVarArray): HRESULT; stdcall;external oleaut;
 function SafeArrayCopy(psa: PVarArray; var psaOut: PVarArray): HRESULT; stdcall;external oleaut;
 function SafeArrayCopy(psa: PVarArray; var psaOut: PVarArray): HRESULT; stdcall;external oleaut;
@@ -53,7 +53,10 @@ function SafeArrayUnlock(psa: PVarArray): HRESULT; stdcall;external oleaut;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2000-08-29 08:23:14  michael
+  Revision 1.2  2000-08-29 17:35:55  michael
+  + Compiles on win32 also now
+
+  Revision 1.1  2000/08/29 08:23:14  michael
   + Initial implementation of varutils
   + Initial implementation of varutils
 
 
 }
 }