Changeset 17504
- Timestamp:
- Oct 3, 2001, 9:22:00 PM (24 years ago)
- Location:
- tags/trunk/src/oleaut32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/oleaut32/dispatch.c ¶
r17271 r17504 8 8 * TODO: Type coercion is implemented in variant.c but not called yet. 9 9 */ 10 #ifdef __WIN32OS2__ 11 #define HAVE_FLOAT_H 12 #define WINE_LARGE_INTEGER 13 #include "oleaut32.h" 14 #endif 10 11 #include "config.h" 15 12 16 13 #include <stdlib.h> … … 18 15 #include <stdio.h> 19 16 #include <ctype.h> 17 18 #include "windef.h" 19 #include "ole.h" 20 #include "oleauto.h" 20 21 #include "winerror.h" 21 22 #include "winreg.h" /* for HKEY_LOCAL_MACHINE */ 22 23 #include "winnls.h" /* for PRIMARYLANGID */ 23 #include "ole.h" 24 #include "heap.h" 24 25 25 #include "wine/obj_oleaut.h" 26 26 27 #include "debugtools.h" 27 28 … … 31 32 32 33 /****************************************************************************** 33 * DispInvoke(OLEAUT32.30)34 * DispInvoke (OLEAUT32.30) 34 35 * 35 36 * … … 43 44 * S_OK on success. 44 45 */ 45 HRESULT WINAPI 46 DispInvoke(VOID* _this, /* object instance */ 47 ITypeInfo* ptinfo, /* object's type info */ 48 DISPID dispidMember, /* member id */ 49 USHORT wFlags, /* kind of method call */ 50 DISPPARAMS* pparams, /* array of arguments */ 51 VARIANT* pvarResult, /* result of method call */ 52 EXCEPINFO* pexcepinfo, /* information about exception */ 53 UINT* puArgErr /* index of bad argument(if any) */ 54 ) 46 HRESULT WINAPI DispInvoke( 47 VOID *_this, /* [in] object instance */ 48 ITypeInfo *ptinfo, /* [in] object's type info */ 49 DISPID dispidMember, /* [in] member id */ 50 USHORT wFlags, /* [in] kind of method call */ 51 DISPPARAMS *pparams, /* [in] array of arguments */ 52 VARIANT *pvarResult, /* [out] result of method call */ 53 EXCEPINFO *pexcepinfo, /* [out] information about exception */ 54 UINT *puArgErr) /* [out] index of bad argument(if any) */ 55 55 { 56 56 HRESULT hr = E_FAIL; … … 74 74 75 75 /****************************************************************************** 76 * 76 * DispGetIDsOfNames (OLEAUT32.29) 77 77 * 78 78 * Convert a set of names to dispids, based on information … … 86 86 * S_OK on success. 87 87 */ 88 HRESULT WINAPI 89 DispGetIDsOfNames(ITypeInfo* ptinfo, 90 OLECHAR** rgszNames, 91 UINT cNames, 92 DISPID* rgdispid) 88 HRESULT WINAPI DispGetIDsOfNames( 89 ITypeInfo *ptinfo, /* [in] */ 90 OLECHAR **rgszNames, /* [in] */ 91 UINT cNames, /* [in] */ 92 DISPID *rgdispid) /* [out] */ 93 93 { 94 94 HRESULT hr = E_FAIL; … … 103 103 104 104 /****************************************************************************** 105 * DispGetParam (OLEAUT32.30)105 * DispGetParam (OLEAUT32.28) 106 106 * 107 107 * Retrive a parameter from a DISPPARAMS structures and coerce it to … … 115 115 * S_OK on success. 116 116 */ 117 HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position, 118 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr) 117 HRESULT WINAPI DispGetParam( 118 DISPPARAMS *pdispparams, /* [in] */ 119 UINT position, /* [in] */ 120 VARTYPE vtTarg, /* [in] */ 121 VARIANT *pvarResult, /* [out] */ 122 UINT *puArgErr) /* [out] */ 119 123 { 120 HRESULT hr = E_FAIL; 124 /* position is counted backwards */ 125 UINT pos; 126 HRESULT hr; 121 127 122 /** 123 * TODO : Call VariantChangeTypeEx with LCID 0 (system) 124 */ 128 TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n", 129 position, pdispparams->cArgs, pdispparams->cNamedArgs); 130 if (position < pdispparams->cArgs) { 131 /* positional arg? */ 132 pos = pdispparams->cArgs - position - 1; 133 } else { 134 /* FIXME: is this how to handle named args? */ 135 for (pos=0; pos<pdispparams->cNamedArgs; pos++) 136 if (pdispparams->rgdispidNamedArgs[pos] == position) break; 125 137 126 FIXME("Coercion of arguments not implemented\n"); 127 return (hr); 138 if (pos==pdispparams->cNamedArgs) 139 return DISP_E_PARAMNOTFOUND; 140 } 141 hr = VariantChangeType(pvarResult, 142 &pdispparams->rgvarg[pos], 143 0, vtTarg); 144 if (hr == DISP_E_TYPEMISMATCH) *puArgErr = pos; 145 return hr; 128 146 } -
TabularUnified tags/trunk/src/oleaut32/oleaut.c ¶
r17271 r17504 3 3 * 4 4 */ 5 #ifdef __WIN32OS2__ 6 #define HAVE_FLOAT_H 7 #define WINE_LARGE_INTEGER 8 #include "oleaut32.h" 9 #endif 10 5 11 #include <string.h> 6 12 … … 12 18 13 19 #include "ole2.h" 14 #include "heap.h" 20 #include "olectl.h" 21 #include "wine/obj_oleaut.h" 22 #include "wine/obj_olefont.h" 15 23 #include "debugtools.h" 16 24 … … 139 147 } 140 148 141 #ifndef __WIN32OS2__142 149 /*********************************************************************** 143 150 * DllRegisterServer … … 155 162 return S_OK; 156 163 } 157 #endif //__WIN32OS2__ 164 165 166 extern void _get_STDFONT_CF(LPVOID); 167 168 /*********************************************************************** 169 * DllGetClassObject (OLEAUT32.1) 170 */ 171 HRESULT WINAPI OLEAUT32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) 172 { 173 *ppv = NULL; 174 if (IsEqualGUID(rclsid,&CLSID_StdFont)) { 175 if (IsEqualGUID(iid,&IID_IClassFactory)) { 176 _get_STDFONT_CF(ppv); 177 IClassFactory_AddRef((IClassFactory*)*ppv); 178 return S_OK; 179 } 180 } 181 FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); 182 return CLASS_E_CLASSNOTAVAILABLE; 183 } 184 185 /*********************************************************************** 186 * DllCanUnloadNow (OLEAUT32.410) 187 */ 188 HRESULT WINAPI OLEAUT32_DllCanUnloadNow() { 189 FIXME("(), stub!\n"); 190 return S_FALSE; 191 } -
TabularUnified tags/trunk/src/oleaut32/oleaut32.def ¶
r17135 r17504 1 ;/* $Id: oleaut32.def,v 1. 7 2001-08-23 18:11:20sandervl Exp $ */1 ;/* $Id: oleaut32.def,v 1.8 2001-10-03 19:21:59 sandervl Exp $ */ 2 2 LIBRARY OLAUTOS2 INITINSTANCE 3 3 DESCRIPTION 'Odin32 System DLL - OleAut32' … … 5 5 6 6 EXPORTS 7 DllGetClassObject = _ DllGetClassObject@12 @17 DllGetClassObject = _OLEAUT32_DllGetClassObject@12 @1 8 8 SysAllocString = _SysAllocString@4 @2 9 9 SysReAllocString = _SysReAllocString@8 @3 … … 254 254 LPSAFEARRAY_Marshal = _LPSAFEARRAY_Marshal@0 @296 255 255 LPSAFEARRAY_Unmarshal = _LPSAFEARRAY_Unmarshal@0 @297 256 DllRegisterServer = _ DllRegisterServer@0 @320257 DllUnregisterServer = _ DllUnregisterServer@0 @321256 DllRegisterServer = _OLEAUT32_DllRegisterServer@0 @320 257 DllUnregisterServer = _OLEAUT32_DllUnregisterServer@0 @321 258 258 VarDateFromUdate = _VarDateFromUdate@12 @330 259 259 VarUdateFromDate = _VarUdateFromDate@16 @331 … … 279 279 UserMSG_free_inst = _UserMSG_free_inst@0 @398 280 280 UserMSG_free_local = _UserMSG_free_local@0 @399 281 DllCanUnloadNow = _ DllCanUnloadNow@0 @410281 DllCanUnloadNow = _OLEAUT32_DllCanUnloadNow@0 @410 282 282 SafeArrayCreateVector = _SafeArrayCreateVector@12 @411 283 283 SafeArrayCopyData = _SafeArrayCopyData@8 @412 -
TabularUnified tags/trunk/src/oleaut32/oleaut32.h ¶
r16033 r17504 1 /* $Id: oleaut32.h,v 1.1 0 2001-04-04 09:02:15sandervl Exp $ */1 /* $Id: oleaut32.h,v 1.11 2001-10-03 19:21:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 OLE stubs for OS/2 … … 59 59 void OpenPrivateLogFileTypelib(); 60 60 61 #define snprintf wsnprintfA 61 62 #endif -
TabularUnified tags/trunk/src/oleaut32/safearray.c ¶
r17271 r17504 8 8 */ 9 9 10 #ifdef __WIN32OS2__11 #define HAVE_FLOAT_H12 #define WINE_LARGE_INTEGER13 #include "oleaut32.h"14 #endif15 10 #include <stdio.h> 16 11 #include <string.h> … … 24 19 DEFAULT_DEBUG_CHANNEL(ole); 25 20 21 #define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str)) 22 26 23 /* Localy used methods */ 27 24 static INT … … 59 56 { 60 57 /* this is taken from wtypes.h. Only [S]es are supported by the SafeArray */ 61 VARTYPE_NOT_SUPPORTED, 62 VARTYPE_NOT_SUPPORTED, 63 2, 64 4, 65 4, 66 8, 58 VARTYPE_NOT_SUPPORTED, /* VT_EMPTY [V] [P] nothing */ 59 VARTYPE_NOT_SUPPORTED, /* VT_NULL [V] [P] SQL style Nul */ 60 2, /* VT_I2 [V][T][P][S] 2 byte signed int */ 61 4, /* VT_I4 [V][T][P][S] 4 byte signed int */ 62 4, /* VT_R4 [V][T][P][S] 4 byte real */ 63 8, /* VT_R8 [V][T][P][S] 8 byte real */ 67 64 8, /* VT_CY [V][T][P][S] currency */ 68 8, 69 4,/* VT_BSTR [V][T][P][S] OLE Automation string*/70 4,/* VT_DISPATCH [V][T][P][S] IDispatch * */65 8, /* VT_DATE [V][T][P][S] date */ 66 sizeof(BSTR), /* VT_BSTR [V][T][P][S] OLE Automation string*/ 67 sizeof(LPDISPATCH), /* VT_DISPATCH [V][T][P][S] IDispatch * */ 71 68 4, /* VT_ERROR [V][T] [S] SCODE */ 72 4, 73 24,/* VT_VARIANT [V][T][P][S] VARIANT * */74 4,/* VT_UNKNOWN [V][T] [S] IUnknown * */75 16,/* VT_DECIMAL [V][T] [S] 16 byte fixed point */69 4, /* VT_BOOL [V][T][P][S] True=-1, False=0*/ 70 sizeof(VARIANT), /* VT_VARIANT [V][T][P][S] VARIANT * */ 71 sizeof(LPUNKNOWN), /* VT_UNKNOWN [V][T] [S] IUnknown * */ 72 sizeof(DECIMAL), /* VT_DECIMAL [V][T] [S] 16 byte fixed point */ 76 73 VARTYPE_NOT_SUPPORTED, /* no VARTYPE here..... */ 77 74 VARTYPE_NOT_SUPPORTED, /* VT_I1 [T] signed char */ 78 1, 75 1, /* VT_UI1 [V][T][P][S] unsigned char */ 79 76 VARTYPE_NOT_SUPPORTED, /* VT_UI2 [T][P] unsigned short */ 80 77 VARTYPE_NOT_SUPPORTED, /* VT_UI4 [T][P] unsigned short */ … … 109 106 110 107 /************************************************************************* 111 * SafeArrayAllocDescriptor 108 * SafeArrayAllocDescriptor (OLEAUT32.36) 112 109 * Allocate the appropriate amount of memory for the SafeArray descriptor 113 110 */ … … 134 131 135 132 /************************************************************************* 136 * SafeArrayAllocData 133 * SafeArrayAllocData (OLEAUT32.37) 137 134 * Allocate the appropriate amount of data for the SafeArray data 138 135 */ … … 141 138 { 142 139 ULONG ulWholeArraySize; /* to store the size of the whole thing */ 143 144 dprintf(("SafeArrayAllocData %x", psa));145 140 146 141 if(! validArg(psa)) … … 161 156 162 157 /************************************************************************* 163 * SafeArrayCreate 158 * SafeArrayCreate (OLEAUT32.15) 164 159 * Create a SafeArray object by encapsulating AllocDescriptor and AllocData 165 160 */ … … 172 167 HRESULT hRes; 173 168 USHORT cDim; 174 175 dprintf(("SafeArrayCreate %x %d %x", vt, cDims, rgsabound));176 169 177 170 /* Validate supported VARTYPE */ … … 208 201 209 202 /************************************************************************* 210 * SafeArrayDestroyDescriptor 203 * SafeArrayDestroyDescriptor (OLEAUT32.38) 211 204 * Frees the memory associated with the descriptor. 212 205 */ … … 214 207 SAFEARRAY *psa) 215 208 { 216 dprintf(("SafeArrayDestroyDescriptor %x", psa));217 218 209 /* Check for lockness before to free... */ 219 210 if(psa->cLocks > 0) … … 229 220 230 221 /************************************************************************* 231 * SafeArrayLock 222 * SafeArrayLock (OLEAUT32.21) 232 223 * Increment the lock counter 233 224 * … … 239 230 SAFEARRAY *psa) 240 231 { 241 dprintf(("SafeArrayLock %x", psa));242 243 232 if(! validArg(psa)) 244 233 return E_INVALIDARG; … … 250 239 251 240 /************************************************************************* 252 * SafeArrayUnlock 241 * SafeArrayUnlock (OLEAUT32.22) 253 242 * Decrement the lock counter 254 243 */ … … 256 245 SAFEARRAY *psa) 257 246 { 258 dprintf(("SafeArrayUnlock %x", psa));259 260 247 if(! validArg(psa)) 261 248 return E_INVALIDARG; … … 269 256 270 257 /************************************************************************* 271 * SafeArrayPutElement 258 * SafeArrayPutElement (OLEAUT32.26) 272 259 * Set the data at the given coordinate 273 260 */ … … 280 267 the desired one... */ 281 268 PVOID elementStorageAddress = NULL; /* Adress to store the data */ 282 BSTR pbstrReAllocStr = NULL; /* BSTR reallocated */283 284 dprintf(("SafeArrayPutElement %x %x %x", psa, rgIndices, pv));285 269 286 270 /* Validate the index given */ … … 300 284 if(isPointer(psa->fFeatures)) { /* increment ref count for this pointer */ 301 285 302 *(( VOID**)elementStorageAddress) = *(VOID**)pv;286 *((PVOID*)elementStorageAddress) = *(PVOID*)pv; 303 287 IUnknown_AddRef( *(IUnknown**)pv); 304 288 … … 306 290 307 291 if(psa->fFeatures == FADF_BSTR) { /* Create a new object */ 308 309 if((pbstrReAllocStr = SysAllocString( (OLECHAR*)pv )) == NULL) { 292 BSTR pbstrReAllocStr = NULL; 293 if(pv && 294 ((pbstrReAllocStr = SYSDUPSTRING( (OLECHAR*)pv )) == NULL)) { 310 295 SafeArrayUnlock(psa); 311 296 return E_OUTOFMEMORY; 312 297 } else 313 298 *((BSTR*)elementStorageAddress) = pbstrReAllocStr; 314 315 } else /* dupplicate the memory */ 299 } 300 else if(psa->fFeatures == FADF_VARIANT) { 301 HRESULT hr = VariantCopy(elementStorageAddress, pv); 302 if (FAILED(hr)) { 303 SafeArrayUnlock(psa); 304 return hr; 305 } 306 } 307 else /* duplicate the memory */ 316 308 memcpy(elementStorageAddress, pv, SafeArrayGetElemsize(psa) ); 317 309 } … … 328 320 329 321 /************************************************************************* 330 * SafeArrayGetElement 322 * SafeArrayGetElement (OLEAUT32.25) 331 323 * Return the data element corresponding the the given coordinate 332 324 */ … … 339 331 the desired one... */ 340 332 PVOID elementStorageAddress = NULL; /* Adress to store the data */ 341 BSTR pbstrReturnedStr = NULL; /* BSTR reallocated */342 343 dprintf(("SafeArrayGetElement %x %x %x", psa, rgIndices, pv));344 333 345 334 if(! validArg(psa)) … … 358 347 359 348 if( psa->fFeatures == FADF_BSTR) { /* reallocate the obj */ 360 if( (pbstrReturnedStr = 361 SysAllocString( *(OLECHAR**)elementStorageAddress )) == NULL) { 349 BSTR pbstrStoredStr = *(OLECHAR**)elementStorageAddress; 350 BSTR pbstrReturnedStr = NULL; 351 if( pbstrStoredStr && 352 ((pbstrReturnedStr = SYSDUPSTRING( pbstrStoredStr )) == NULL) ) { 362 353 SafeArrayUnlock(psa); 363 354 return E_OUTOFMEMORY; 364 355 } else 365 356 *((BSTR*)pv) = pbstrReturnedStr; 366 367 } else if( isPointer(psa->fFeatures) ) /* simply copy the pointer */ 368 pv = *((PVOID*)elementStorageAddress); 357 } 358 else if( psa->fFeatures == FADF_VARIANT) { 359 HRESULT hr = VariantCopy(pv, elementStorageAddress); 360 if (FAILED(hr)) { 361 SafeArrayUnlock(psa); 362 return hr; 363 } 364 } 365 else if( isPointer(psa->fFeatures) ) /* simply copy the pointer */ 366 *(PVOID*)pv = *((PVOID*)elementStorageAddress); 369 367 else /* copy the bytes */ 370 memcpy(pv, elementStorageAddress, SafeArrayGetElemsize(psa));368 memcpy(pv, elementStorageAddress, psa->cbElements ); 371 369 372 370 } else { … … 379 377 380 378 /************************************************************************* 381 * SafeArrayGetUBound 379 * SafeArrayGetUBound (OLEAUT32.19) 382 380 * return the UP bound for a given array dimension 383 381 */ … … 387 385 LONG *plUbound) 388 386 { 389 390 dprintf(("SafeArrayGetUBound %x %x %x", psa, nDim, plUbound));391 392 387 if(! validArg(psa)) 393 388 return E_INVALIDARG; … … 396 391 return DISP_E_BADINDEX; 397 392 393 if(0 == nDim) 394 return DISP_E_BADINDEX; 395 398 396 *plUbound = psa->rgsabound[nDim-1].lLbound + 399 397 psa->rgsabound[nDim-1].cElements - 1; … … 403 401 404 402 /************************************************************************* 405 * SafeArrayGetLBound 403 * SafeArrayGetLBound (OLEAUT32.20) 406 404 * Return the LO bound for a given array dimension 407 405 */ … … 417 415 return DISP_E_BADINDEX; 418 416 417 if(0 == nDim) 418 return DISP_E_BADINDEX; 419 419 420 *plLbound = psa->rgsabound[nDim-1].lLbound; 420 421 return S_OK; … … 422 423 423 424 /************************************************************************* 424 * SafeArrayGetDim 425 * SafeArrayGetDim (OLEAUT32.17) 425 426 * returns the number of dimension in the array 426 427 */ … … 439 440 440 441 /************************************************************************* 441 * SafeArrayGetElemsize 442 * SafeArrayGetElemsize (OLEAUT32.18) 442 443 * Return the size of the element in the array 443 444 */ … … 456 457 457 458 /************************************************************************* 458 * SafeArrayAccessData 459 * SafeArrayAccessData (OLEAUT32.23) 459 460 * increment the access count and return the data 460 461 */ … … 484 485 485 486 /************************************************************************* 486 * SafeArrayUnaccessData 487 * SafeArrayUnaccessData (OLEAUT32.24) 487 488 * Decrement the access count 488 489 */ … … 497 498 498 499 /************************************************************************ 499 * SafeArrayPtrOfIndex 500 * SafeArrayPtrOfIndex (OLEAUT32.148) 500 501 * Return a pointer to the element at rgIndices 501 502 */ … … 523 524 524 525 /************************************************************************ 525 * SafeArrayDestroyData 526 * SafeArrayDestroyData (OLEAUT32.39) 526 527 * Frees the memory data bloc 527 528 */ … … 532 533 ULONG ulWholeArraySize; /* count spot in array */ 533 534 ULONG ulDataIter; /* to iterate the data space */ 534 IUnknown *punk;535 BSTR bstr;536 535 537 536 if(! validArg(psa)) … … 544 543 545 544 if(isPointer(psa->fFeatures)) { /* release the pointers */ 545 IUnknown *punk; 546 546 547 547 for(ulDataIter=0; ulDataIter < ulWholeArraySize; ulDataIter++) { … … 552 552 } 553 553 554 } else if(psa->fFeatures & FADF_BSTR) { /* deallocate the obj */ 554 } 555 else if(psa->fFeatures & FADF_BSTR) { /* deallocate the obj */ 556 BSTR bstr; 555 557 556 558 for(ulDataIter=0; ulDataIter < ulWholeArraySize; ulDataIter++) { … … 559 561 if( bstr != NULL) 560 562 SysFreeString( bstr ); 563 } 564 } 565 else if(psa->fFeatures & FADF_VARIANT) { /* deallocate the obj */ 566 567 for(ulDataIter=0; ulDataIter < ulWholeArraySize; ulDataIter++) { 568 VariantClear((VARIANT*)((char *) psa->pvData+(ulDataIter*(psa->cbElements)))); 561 569 } 562 570 } … … 578 586 579 587 /************************************************************************ 580 * SafeArrayCopyData 588 * SafeArrayCopyData (OLEAUT32.412) 581 589 * Copy the psaSource's data block into psaTarget if dimension and size 582 590 * permits it. … … 616 624 } 617 625 618 } else if( (*psaTarget)->fFeatures & FADF_BSTR) { /* the target contain BSTR 626 } 627 else if( (*psaTarget)->fFeatures & FADF_BSTR) { /* the target contain BSTR 619 628 that must be freed */ 620 629 for(lDelta=0;lDelta < ulWholeArraySize; lDelta++) { … … 626 635 } 627 636 } 637 else if( (*psaTarget)->fFeatures & FADF_VARIANT) { 638 639 for(lDelta=0;lDelta < ulWholeArraySize; lDelta++) { 640 VariantClear((VARIANT*)((char *) (*psaTarget)->pvData + (lDelta * (*psaTarget)->cbElements))); 641 } 642 } 628 643 629 644 return duplicateData(psaSource, psaTarget); … … 631 646 632 647 /************************************************************************ 633 * SafeArrayDestroy 648 * SafeArrayDestroy (OLEAUT32.16) 634 649 * Deallocates all memory reserved for the SafeArray 635 650 */ … … 653 668 654 669 /************************************************************************ 655 * SafeArrayCopy 670 * SafeArrayCopy (OLEAUT32.27) 656 671 * Make a dupplicate of a SafeArray 657 672 */ … … 706 721 707 722 /************************************************************************ 708 * SafeArrayCreateVector 723 * SafeArrayCreateVector (OLEAUT32.411) 709 724 * Creates a one dimension safearray where the data is next to the 710 725 * SAFEARRAY structure. … … 743 758 744 759 /************************************************************************ 745 * SafeArrayRedim 760 * SafeArrayRedim (OLEAUT32.40) 746 761 * Changes the caracteristics of the last dimension of the SafeArray 747 762 */ … … 808 823 /* Check whether the size of the chunk makes sense... That's the only thing 809 824 I can think of now... */ 825 810 826 psaSize = HeapSize(GetProcessHeap(), 0, psa); 811 827 if (psaSize == -1) … … 838 854 if(lDelta < 0) { /* array needs to be shorthen */ 839 855 if( isPointer(psa->fFeatures)) /* ptr that need to be released */ 840 856 for(;lDelta < 0; lDelta++) { 841 857 punk = *(IUnknown**) 842 858 ((char *) psa->pvData+((ulWholeArraySize+lDelta)*psa->cbElements)); … … 847 863 848 864 else if(psa->fFeatures & FADF_BSTR) /* BSTR that need to be freed */ 849 865 for(;lDelta < 0; lDelta++) { 850 866 bstr = *(BSTR*) 851 867 ((char *) psa->pvData+((ulWholeArraySize+lDelta)*psa->cbElements)); … … 853 869 if( bstr != NULL ) 854 870 SysFreeString( bstr ); 871 } 872 else if(psa->fFeatures & FADF_VARIANT) 873 for(;lDelta < 0; lDelta++) { 874 VariantClear((VARIANT*)((char *) psa->pvData+((ulWholeArraySize+lDelta)*psa->cbElements))); 855 875 } 856 876 } … … 894 914 { 895 915 switch(vt) { 916 case VT_BSTR: return FADF_BSTR; 896 917 case VT_UNKNOWN: return FADF_UNKNOWN; 897 918 case VT_DISPATCH: return FADF_DISPATCH; 898 case VT_ BSTR: return FADF_BSTR;919 case VT_VARIANT: return FADF_VARIANT; 899 920 } 900 921 return 0; … … 973 994 974 995 for(; iter<psa->cDims; iter++) { 975 if((hRes = SafeArrayGetLBound(psa, iter, &lLBound)) != S_OK)996 if((hRes = SafeArrayGetLBound(psa, (iter+1), &lLBound)) != S_OK) 976 997 return FALSE; 977 if((hRes = SafeArrayGetUBound(psa, iter, &lUBound)) != S_OK)998 if((hRes = SafeArrayGetUBound(psa, (iter+1), &lUBound)) != S_OK) 978 999 return FALSE; 979 1000 … … 1014 1035 ULONG ulWholeArraySize; /* size of the thing */ 1015 1036 LONG lDelta; 1016 IUnknown *punk;1017 BSTR pbstrReAllocStr = NULL; /* BSTR reallocated */1018 1037 1019 1038 ulWholeArraySize = getArraySize(psa); /* Number of item in SA */ … … 1023 1042 if( isPointer(psa->fFeatures) ) { /* If datatype is object increment 1024 1043 object's reference count */ 1044 IUnknown *punk; 1025 1045 1026 1046 for(lDelta=0; lDelta < ulWholeArraySize; lDelta++) { … … 1035 1055 ulWholeArraySize*psa->cbElements); 1036 1056 1037 } else if( psa->fFeatures & FADF_BSTR ) { /* if datatype is BSTR allocate 1038 the BSTR in the new array */ 1057 } 1058 else if( psa->fFeatures & FADF_BSTR ) { /* if datatype is BSTR allocate 1059 the BSTR in the new array */ 1060 BSTR pbstrReAllocStr = NULL; 1039 1061 1040 1062 for(lDelta=0; lDelta < ulWholeArraySize; lDelta++) { 1041 if(( pbstrReAllocStr = S ysAllocString(1063 if(( pbstrReAllocStr = SYSDUPSTRING( 1042 1064 *(BSTR*)((char *) psa->pvData+(lDelta * psa->cbElements)))) == NULL) { 1043 1065 … … 1050 1072 } 1051 1073 1052 } else { /* Simply copy the source array data into target array */ 1074 } 1075 else if( psa->fFeatures & FADF_VARIANT ) { 1076 1077 for(lDelta=0; lDelta < ulWholeArraySize; lDelta++) { 1078 VariantCopy((VARIANT*)((char *) (*ppsaOut)->pvData+(lDelta * psa->cbElements)), 1079 (VARIANT*)((char *) psa->pvData+(lDelta * psa->cbElements))); 1080 } 1081 1082 } 1083 else { /* Simply copy the source array data into target array */ 1053 1084 1054 1085 memcpy((*ppsaOut)->pvData, psa->pvData, … … 1063 1094 1064 1095 /************************************************************************ 1065 * SafeArrayGetVarType 1096 * SafeArrayGetVarType (OLEAUT32.77) 1066 1097 * Returns the VARTYPE stored in the given safearray 1067 1098 */ … … 1078 1109 { 1079 1110 /* VT tag @ negative offset 4 in the array descriptor */ 1080 FIXME("Returning VT_BSTR instead of VT_... ");1111 FIXME("Returning VT_BSTR instead of VT_...\n"); 1081 1112 vt = VT_BSTR; 1082 1113 } … … 1085 1116 vt = VT_RECORD; 1086 1117 } 1118 else if (psa->fFeatures & FADF_BSTR) 1119 { 1120 vt = VT_BSTR; 1121 } 1122 else if (psa->fFeatures & FADF_UNKNOWN) 1123 { 1124 vt = VT_UNKNOWN; 1125 } 1087 1126 else if (psa->fFeatures & FADF_DISPATCH) 1088 1127 { 1089 1128 vt = VT_DISPATCH; 1090 1129 } 1091 else if (psa->fFeatures & FADF_ UNKNOWN)1130 else if (psa->fFeatures & FADF_VARIANT) 1092 1131 { 1093 vt = VT_ UNKNOWN;1132 vt = VT_VARIANT; 1094 1133 } 1095 1134 … … 1099 1138 hr = S_OK; 1100 1139 } 1101 1102 TRACE("HRESULT = %08lx ", hr);1140 1141 TRACE("HRESULT = %08lx\n", hr); 1103 1142 return hr; 1104 1143 } -
TabularUnified tags/trunk/src/oleaut32/stubs.cpp ¶
r17135 r17504 1 /* $Id: stubs.cpp,v 1.1 1 2001-08-23 18:11:21sandervl Exp $ */1 /* $Id: stubs.cpp,v 1.12 2001-10-03 19:21:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 COM/OLE stubs for OS/2 … … 12 12 13 13 #include "oleaut32.h" 14 15 //*****************************************************************************16 //*****************************************************************************17 HRESULT WIN32API DllCanUnloadNow()18 {19 dprintf(("OLEAUT32: DllCanUnloadNow - stub"));20 return S_OK;21 }22 23 //*****************************************************************************24 //*****************************************************************************25 HRESULT WIN32API DllRegisterServer(void )26 {27 dprintf(("OLEAUT32: DllRegisterServer - stub"));28 return S_OK;29 }30 31 //*****************************************************************************32 //*****************************************************************************33 HRESULT WIN32API DllUnregisterServer(void )34 {35 dprintf(("OLEAUT32: DllUnregisterServer - stub"));36 return S_OK;37 }38 39 //*****************************************************************************40 //*****************************************************************************41 HRESULT WIN32API DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv)42 {43 dprintf(("OLEAUT32: DllGetClassObject - stub"));44 return S_OK;45 }46 47 14 48 15 //***************************************************************************** -
TabularUnified tags/trunk/src/oleaut32/typelib.c ¶
r17271 r17504 55 55 #include "winreg.h" /* for HKEY_LOCAL_MACHINE */ 56 56 57 #include "wine/unicode.h" 57 58 #include "wine/obj_base.h" 58 59 #include "heap.h" 59 60 #include "ole2disp.h" 60 61 #include "typelib.h" 61 62 62 #include "debugtools.h" 63 #include "ntddk.h" 63 64 64 65 DEFAULT_DEBUG_CHANNEL(ole); … … 251 252 } 252 253 #endif 253 254 254 /****************************************************************************** 255 255 * LoadTypeLib [OLEAUT32.161] … … 263 263 * Failure: Status 264 264 */ 265 int TLB_ReadTypeLib( PCHAR file, ITypeLib2 **ppTypelib);265 int TLB_ReadTypeLib(LPCWSTR file, INT index, ITypeLib2 **ppTypelib); 266 266 267 267 HRESULT WINAPI LoadTypeLib( … … 286 286 ITypeLib **pptLib) /* [out] Pointer to pointer to loaded type library */ 287 287 { 288 LPSTR p=NULL;289 WCHAR szPath[MAX_PATH+1];288 WCHAR szPath[MAX_PATH+1], szFileCopy[MAX_PATH+1]; 289 const WCHAR *pFile, *pIndexStr; 290 290 HRESULT res; 291 INT index = 1; 291 292 TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib); 292 293 293 if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath,NULL)) 294 res = TYPE_E_CANTLOADLIBRARY; 295 else { 296 p=HEAP_strdupWtoA(GetProcessHeap(),0,szPath); 297 res= TLB_ReadTypeLib(p, (ITypeLib2**)pptLib); 298 } 294 pFile = szFile; 295 if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath, 296 NULL)) { 297 298 /* Look for a trailing '\\' followed by an index */ 299 pIndexStr = strrchrW(szFile, '\\'); 300 if(pIndexStr && pIndexStr != szFile && *++pIndexStr != '\0') { 301 index = wcstol(pIndexStr, NULL, 10); 302 memcpy(szFileCopy, szFile, 303 (pIndexStr - szFile - 1) * sizeof(WCHAR)); 304 szFileCopy[pIndexStr - szFile - 1] = '\0'; 305 pFile = szFileCopy; 306 if(!SearchPathW(NULL,szFileCopy,NULL,sizeof(szPath)/sizeof(WCHAR), 307 szPath,NULL)) 308 return TYPE_E_CANTLOADLIBRARY; 309 } else 310 return TYPE_E_CANTLOADLIBRARY; 311 } 312 313 TRACE("File %s index %d\n", debugstr_w(pFile), index); 314 315 res = TLB_ReadTypeLib(pFile, index, (ITypeLib2**)pptLib); 316 299 317 if (SUCCEEDED(res)) 300 318 switch(regkind) … … 318 336 } 319 337 320 if(p) HeapFree(GetProcessHeap(),0,p);321 338 TRACE(" returns %08lx\n",res); 322 339 return res; … … 372 389 CHAR keyName[120]; 373 390 HKEY key, subKey; 391 UINT types, tidx; 392 TYPEKIND kind; 393 static const char *PSOA = "{00020424-0000-0000-C000-000000000046}"; 374 394 375 395 if (ptlib == NULL || szFullPath == NULL) … … 381 401 StringFromGUID2(&attr->guid, guid, 80); 382 402 guidA = HEAP_strdupWtoA(GetProcessHeap(), 0, guid); 383 #ifdef __WIN32OS2__384 sprintf(keyName, "TypeLib\\%s\\%x.%x",385 guidA, attr->wMajorVerNum, attr->wMinorVerNum);386 #else387 403 snprintf(keyName, sizeof(keyName), "TypeLib\\%s\\%x.%x", 388 404 guidA, attr->wMajorVerNum, attr->wMinorVerNum); 389 #endif390 405 HeapFree(GetProcessHeap(), 0, guidA); 391 406 … … 425 440 CHAR buf[20]; 426 441 /* FIXME: is %u correct? */ 427 #ifdef __WIN32OS2__428 sprintf(buf, "%u", attr->wLibFlags);429 #else430 442 snprintf(buf, sizeof(buf), "%u", attr->wLibFlags); 431 #endif432 443 if (RegSetValueExA(subKey, NULL, 0, REG_SZ, 433 444 buf, lstrlenA(buf) + 1) != ERROR_SUCCESS) … … 439 450 res = E_FAIL; 440 451 452 /* register OLE Automation-compatible interfaces for this typelib */ 453 types = ITypeLib_GetTypeInfoCount(ptlib); 454 for (tidx=0; tidx<types; tidx++) { 455 if (SUCCEEDED(ITypeLib_GetTypeInfoType(ptlib, tidx, &kind))) { 456 LPOLESTR name = NULL; 457 ITypeInfo *tinfo = NULL; 458 BOOL stop = FALSE; 459 ITypeLib_GetDocumentation(ptlib, tidx, &name, NULL, NULL, NULL); 460 switch (kind) { 461 case TKIND_INTERFACE: 462 TRACE_(typelib)("%d: interface %s\n", tidx, debugstr_w(name)); 463 ITypeLib_GetTypeInfo(ptlib, tidx, &tinfo); 464 break; 465 case TKIND_DISPATCH: 466 TRACE_(typelib)("%d: dispinterface %s\n", tidx, debugstr_w(name)); 467 /* ITypeLib_GetTypeInfo(ptlib, tidx, &tinfo); */ 468 break; 469 case TKIND_COCLASS: 470 TRACE_(typelib)("%d: coclass %s\n", tidx, debugstr_w(name)); 471 /* coclasses should probably not be registered? */ 472 break; 473 default: 474 TRACE_(typelib)("%d: %s\n", tidx, debugstr_w(name)); 475 break; 476 } 477 if (tinfo) { 478 TYPEATTR *tattr = NULL; 479 ITypeInfo_GetTypeAttr(tinfo, &tattr); 480 if (tattr) { 481 TRACE_(typelib)("guid=%s, flags=%04x\n", 482 debugstr_guid(&tattr->guid), 483 tattr->wTypeFlags); 484 if (tattr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION) { 485 /* register interface<->typelib coupling */ 486 StringFromGUID2(&tattr->guid, guid, 80); 487 guidA = HEAP_strdupWtoA(GetProcessHeap(), 0, guid); 488 snprintf(keyName, sizeof(keyName), "Interface\\%s", guidA); 489 HeapFree(GetProcessHeap(), 0, guidA); 490 491 if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyName, 0, NULL, 0, 492 KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { 493 if (name) 494 RegSetValueExW(key, NULL, 0, REG_SZ, 495 (BYTE *)name, lstrlenW(name) * sizeof(OLECHAR)); 496 497 if (RegCreateKeyExA(key, "ProxyStubClsid", 0, NULL, 0, 498 KEY_WRITE, NULL, &subKey, NULL) == ERROR_SUCCESS) { 499 RegSetValueExA(subKey, NULL, 0, REG_SZ, 500 PSOA, strlen(PSOA)); 501 RegCloseKey(subKey); 502 } 503 if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0, 504 KEY_WRITE, NULL, &subKey, NULL) == ERROR_SUCCESS) { 505 RegSetValueExA(subKey, NULL, 0, REG_SZ, 506 PSOA, strlen(PSOA)); 507 RegCloseKey(subKey); 508 } 509 510 if (RegCreateKeyExA(key, "TypeLib", 0, NULL, 0, 511 KEY_WRITE, NULL, &subKey, NULL) == ERROR_SUCCESS) { 512 CHAR ver[32]; 513 StringFromGUID2(&attr->guid, guid, 80); 514 snprintf(ver, sizeof(ver), "%x.%x", 515 attr->wMajorVerNum, attr->wMinorVerNum); 516 RegSetValueExW(subKey, NULL, 0, REG_SZ, 517 (BYTE *)guid, lstrlenW(guid) * sizeof(OLECHAR)); 518 RegSetValueExA(subKey, "Version", 0, REG_SZ, 519 ver, lstrlenA(ver)); 520 RegCloseKey(subKey); 521 } 522 RegCloseKey(key); 523 } 524 } 525 ITypeInfo_ReleaseTypeAttr(tinfo, tattr); 526 } 527 ITypeInfo_Release(tinfo); 528 } 529 SysFreeString(name); 530 if (stop) break; 531 } 532 } 533 441 534 ITypeLib_ReleaseTLibAttr(ptlib, attr); 535 442 536 return res; 443 537 } … … 464 558 } 465 559 466 #if ndef __WIN32OS2__560 #ifdef __WIN32OS2__ 467 561 /**************************************************************************** 468 562 * OaBuildVersion (TYPELIB.15) … … 1761 1855 #define MSFT_SIGNATURE 0x5446534D /* "MSFT" */ 1762 1856 #define SLTG_SIGNATURE 0x47544c53 /* "SLTG" */ 1763 int TLB_ReadTypeLib(LP STR pszFileName, ITypeLib2 **ppTypeLib)1764 { 1765 int ret = E_FAIL;1857 int TLB_ReadTypeLib(LPCWSTR pszFileName, INT index, ITypeLib2 **ppTypeLib) 1858 { 1859 int ret = TYPE_E_CANTLOADLIBRARY; 1766 1860 DWORD dwSignature = 0; 1767 1861 HFILE hFile; 1768 int nStrLen = strlen(pszFileName); 1769 int i; 1770 1771 PCHAR pszTypeLibIndex = NULL; 1772 PCHAR pszDllName = NULL; 1773 1774 TRACE_(typelib)("%s\n", pszFileName); 1862 1863 TRACE_(typelib)("%s:%d\n", debugstr_w(pszFileName), index); 1775 1864 1776 1865 *ppTypeLib = NULL; 1777 1866 1778 /* is it a DLL? */1779 for (i=0 ; i < nStrLen ; ++i)1780 {1781 pszFileName[i] = tolower(pszFileName[i]);1782 }1783 pszTypeLibIndex = strstr(pszFileName, ".dll");1784 1785 /* find if there's a back-slash after .DLL (good sign of the presence of a typelib index) */1786 if (pszTypeLibIndex)1787 {1788 pszTypeLibIndex = strstr(pszTypeLibIndex, "\\");1789 }1790 1791 /* is there any thing after trailing back-slash ? */1792 if (pszTypeLibIndex && pszTypeLibIndex < pszFileName + nStrLen)1793 {1794 /* yes -> it's an index! store DLL name, without the trailing back-slash */1795 size_t nMemToAlloc = pszTypeLibIndex - pszFileName;1796 1797 pszDllName = HeapAlloc(GetProcessHeap(),1798 HEAP_ZERO_MEMORY,1799 nMemToAlloc + 1);1800 1801 strncpy(pszDllName, pszFileName, nMemToAlloc);1802 1803 /* move index string pointer pass the backslash */1804 while (*pszTypeLibIndex == '\\')1805 ++pszTypeLibIndex;1806 }1807 else1808 {1809 /* No index, reset variable to 1 */1810 pszDllName = HeapAlloc(GetProcessHeap(),1811 HEAP_ZERO_MEMORY,1812 nStrLen + 1);1813 1814 strncpy(pszDllName, pszFileName, nStrLen);1815 1816 pszTypeLibIndex = "1\0";1817 }1818 1819 TRACE_(typelib)("File name without index %s\n", pszDllName);1820 TRACE_(typelib)("Index of typelib %s\n", pszTypeLibIndex);1821 1822 1823 1867 /* check the signature of the file */ 1824 hFile = CreateFile A( pszDllName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );1868 hFile = CreateFileW( pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); 1825 1869 if (INVALID_HANDLE_VALUE != hFile) 1826 1870 { … … 1856 1900 { 1857 1901 /* find the typelibrary resource*/ 1858 HINSTANCE hinstDLL = LoadLibraryEx A(pszDllName, 0, DONT_RESOLVE_DLL_REFERENCES|1902 HINSTANCE hinstDLL = LoadLibraryExW(pszFileName, 0, DONT_RESOLVE_DLL_REFERENCES| 1859 1903 LOAD_LIBRARY_AS_DATAFILE|LOAD_WITH_ALTERED_SEARCH_PATH); 1860 1904 if (hinstDLL) 1861 1905 { 1862 HRSRC hrsrc = FindResourceA(hinstDLL, MAKEINTRESOURCEA(atoi(pszTypeLibIndex)), "TYPELIB"); 1906 HRSRC hrsrc = FindResourceA(hinstDLL, MAKEINTRESOURCEA(index), 1907 "TYPELIB"); 1863 1908 if (hrsrc) 1864 1909 { … … 1895 1940 } 1896 1941 1897 HeapFree(GetProcessHeap(), 0, pszDllName);1898 1899 1942 if(*ppTypeLib) 1900 1943 ret = S_OK; 1901 1944 else 1902 ERR("Loading of typelib %s failed with error 0x%08lx\n", pszFileName, GetLastError()); 1945 ERR("Loading of typelib %s failed with error 0x%08lx\n", 1946 debugstr_w(pszFileName), GetLastError()); 1903 1947 1904 1948 return ret; … … 2486 2530 for(param = 0; param < (*ppFuncDesc)->funcdesc.cParams; param++) { 2487 2531 char *paramName = pNameTable + *pArg; 2488 /* right, if the arg type follows then paramName points to the 2nd 2489 letter of the name (or there is no name), else if the next 2490 WORD is an offset to the arg type then paramName points to the 2491 first letter. Before the name there always seems to be the byte 2492 0xff or 0x00, so let's take one char off paramName and see what 2493 we're pointing at. Got that? */ 2494 2495 if(*pArg == 0xffff) /* If we don't have a name the type seems to 2496 always follow. FIXME is this correct? */ 2497 paramName = NULL; 2532 BOOL HaveOffs; 2533 /* If arg type follows then paramName points to the 2nd 2534 letter of the name, else the next WORD is an offset to 2535 the arg type and paramName points to the first letter. 2536 So let's take one char off paramName and see if we're 2537 pointing at an alpha-numeric char. However if *pArg is 2538 0xffff or 0xfffe then the param has no name, the former 2539 meaning that the next WORD is the type, the latter 2540 meaning the the next WORD is an offset to the type. */ 2541 2542 HaveOffs = FALSE; 2543 if(*pArg == 0xffff) 2544 paramName = NULL; 2545 else if(*pArg == 0xfffe) { 2546 paramName = NULL; 2547 HaveOffs = TRUE; 2548 } 2549 else if(!isalnum(*(paramName-1))) 2550 HaveOffs = TRUE; 2498 2551 2499 2552 pArg++; 2500 2553 2501 if(paramName && 2502 (*(paramName-1) == '\xff' || 2503 *(paramName-1) == '\x00')) { /* the next word is an offset to 2504 the type */ 2554 if(HaveOffs) { /* the next word is an offset to type */ 2505 2555 pType = (WORD*)(pFirstItem + *pArg); 2506 2556 SLTG_DoType(pType, pFirstItem, … … 2601 2651 if(pItem->magic != SLTG_ENUMITEM_MAGIC) { 2602 2652 FIXME("enumitem magic = %04x\n", pItem->magic); 2603 return ;2653 return NULL; 2604 2654 } 2605 2655 *ppVarDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, -
TabularUnified tags/trunk/src/oleaut32/variant.c ¶
r17271 r17504 48 48 DEFAULT_DEBUG_CHANNEL(ole); 49 49 50 #define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str)) 51 50 52 #ifndef FLT_MAX 51 53 # ifdef MAXFLOAT … … 90 92 * 400 then it is a leap year. 91 93 */ 92 /* According to postg eSQL date parsing functions there is94 /* According to postgreSQL date parsing functions there is 93 95 * a leap year when this expression is true. 94 96 * (((y % 4) == 0) && (((y % 100) != 0) || ((y % 400) == 0))) … … 104 106 */ 105 107 static const double DAYS_IN_ONE_YEAR = 365.2425; 108 106 109 107 110 /****************************************************************************** … … 235 238 static BOOL TmToDATE( struct tm* pTm, DATE *pDateOut ) 236 239 { 237 if( (pTm->tm_year - 1900) >= 0 ) 238 { 239 int leapYear = 0; 240 241 /* Start at 1. This is the way DATE is defined. 242 * January 1, 1900 at Midnight is 1.00. 243 * January 1, 1900 at 6AM is 1.25. 244 * and so on. 245 */ 246 *pDateOut = 1; 247 248 /* Add the number of days corresponding to 249 * tm_year. 250 */ 251 *pDateOut += (pTm->tm_year - 1900) * 365; 252 253 /* Add the leap days in the previous years between now and 1900. 254 * Note a leap year is one that is a multiple of 4 255 * but not of a 100. Except if it is a multiple of 256 * 400 then it is a leap year. 257 */ 258 *pDateOut += ( (pTm->tm_year - 1) / 4 ) - ( 1900 / 4 ); 259 *pDateOut -= ( (pTm->tm_year - 1) / 100 ) - ( 1900 / 100 ); 260 *pDateOut += ( (pTm->tm_year - 1) / 400 ) - ( 1900 / 400 ); 261 262 /* Set the leap year flag if the 263 * current year specified by tm_year is a 264 * leap year. This will be used to add a day 265 * to the day count. 266 */ 267 if( isleap( pTm->tm_year ) ) 268 leapYear = 1; 269 270 /* Add the number of days corresponding to 271 * the month. 272 */ 273 switch( pTm->tm_mon ) 274 { 275 case 2: 276 *pDateOut += 31; 277 break; 278 case 3: 279 *pDateOut += ( 59 + leapYear ); 280 break; 281 case 4: 282 *pDateOut += ( 90 + leapYear ); 283 break; 284 case 5: 285 *pDateOut += ( 120 + leapYear ); 286 break; 287 case 6: 288 *pDateOut += ( 151 + leapYear ); 289 break; 290 case 7: 291 *pDateOut += ( 181 + leapYear ); 292 break; 293 case 8: 294 *pDateOut += ( 212 + leapYear ); 295 break; 296 case 9: 297 *pDateOut += ( 243 + leapYear ); 298 break; 299 case 10: 300 *pDateOut += ( 273 + leapYear ); 301 break; 302 case 11: 303 *pDateOut += ( 304 + leapYear ); 304 break; 305 case 12: 306 *pDateOut += ( 334 + leapYear ); 307 break; 308 } 309 /* Add the number of days in this month. 310 */ 311 *pDateOut += pTm->tm_mday; 312 313 /* Add the number of seconds, minutes, and hours 314 * to the DATE. Note these are the fracionnal part 315 * of the DATE so seconds / number of seconds in a day. 316 */ 317 *pDateOut += pTm->tm_hour / 24.0; 318 *pDateOut += pTm->tm_min / 1440.0; 319 *pDateOut += pTm->tm_sec / 86400.0; 320 return TRUE; 321 } 322 return FALSE; 240 int leapYear = 0; 241 242 if( (pTm->tm_year - 1900) < 0 ) return FALSE; 243 244 /* Start at 1. This is the way DATE is defined. 245 * January 1, 1900 at Midnight is 1.00. 246 * January 1, 1900 at 6AM is 1.25. 247 * and so on. 248 */ 249 *pDateOut = 1; 250 251 /* Add the number of days corresponding to 252 * tm_year. 253 */ 254 *pDateOut += (pTm->tm_year - 1900) * 365; 255 256 /* Add the leap days in the previous years between now and 1900. 257 * Note a leap year is one that is a multiple of 4 258 * but not of a 100. Except if it is a multiple of 259 * 400 then it is a leap year. 260 */ 261 *pDateOut += ( (pTm->tm_year - 1) / 4 ) - ( 1900 / 4 ); 262 *pDateOut -= ( (pTm->tm_year - 1) / 100 ) - ( 1900 / 100 ); 263 *pDateOut += ( (pTm->tm_year - 1) / 400 ) - ( 1900 / 400 ); 264 265 /* Set the leap year flag if the 266 * current year specified by tm_year is a 267 * leap year. This will be used to add a day 268 * to the day count. 269 */ 270 if( isleap( pTm->tm_year ) ) 271 leapYear = 1; 272 273 /* Add the number of days corresponding to 274 * the month. 275 */ 276 switch( pTm->tm_mon ) 277 { 278 case 2: 279 *pDateOut += 31; 280 break; 281 case 3: 282 *pDateOut += ( 59 + leapYear ); 283 break; 284 case 4: 285 *pDateOut += ( 90 + leapYear ); 286 break; 287 case 5: 288 *pDateOut += ( 120 + leapYear ); 289 break; 290 case 6: 291 *pDateOut += ( 151 + leapYear ); 292 break; 293 case 7: 294 *pDateOut += ( 181 + leapYear ); 295 break; 296 case 8: 297 *pDateOut += ( 212 + leapYear ); 298 break; 299 case 9: 300 *pDateOut += ( 243 + leapYear ); 301 break; 302 case 10: 303 *pDateOut += ( 273 + leapYear ); 304 break; 305 case 11: 306 *pDateOut += ( 304 + leapYear ); 307 break; 308 case 12: 309 *pDateOut += ( 334 + leapYear ); 310 break; 311 } 312 /* Add the number of days in this month. 313 */ 314 *pDateOut += pTm->tm_mday; 315 316 /* Add the number of seconds, minutes, and hours 317 * to the DATE. Note these are the fracionnal part 318 * of the DATE so seconds / number of seconds in a day. 319 */ 320 *pDateOut += pTm->tm_hour / 24.0; 321 *pDateOut += pTm->tm_min / 1440.0; 322 *pDateOut += pTm->tm_sec / 86400.0; 323 return TRUE; 323 324 } 324 325 … … 339 340 static BOOL DateToTm( DATE dateIn, DWORD dwFlags, struct tm* pTm ) 340 341 { 341 /* Do not process dates smaller than January 1, 1900. 342 * Which corresponds to 2.0 in the windows DATE format. 343 */ 344 if( dateIn >= 2.0 ) 345 { 346 double decimalPart = 0.0; 347 double wholePart = 0.0; 348 349 memset(pTm,0,sizeof(*pTm)); 350 351 /* Because of the nature of DATE format which 352 * associates 2.0 to January 1, 1900. We will 353 * remove 1.0 from the whole part of the DATE 354 * so that in the following code 1.0 355 * will correspond to January 1, 1900. 356 * This simplifies the processing of the DATE value. 357 */ 358 dateIn -= 1.0; 359 360 wholePart = (double) floor( dateIn ); 361 decimalPart = fmod( dateIn, wholePart ); 362 363 if( !(dwFlags & VAR_TIMEVALUEONLY) ) 364 { 365 int nDay = 0; 366 int leapYear = 0; 367 double yearsSince1900 = 0; 368 /* Start at 1900, this is where the DATE time 0.0 starts. 369 */ 370 pTm->tm_year = 1900; 371 /* find in what year the day in the "wholePart" falls into. 372 * add the value to the year field. 373 */ 374 yearsSince1900 = floor( (wholePart / DAYS_IN_ONE_YEAR) + 0.001 ); 375 pTm->tm_year += yearsSince1900; 376 /* determine if this is a leap year. 377 */ 378 if( isleap( pTm->tm_year ) ) 379 { 380 leapYear = 1; 381 wholePart++; 382 } 383 384 /* find what day of that year the "wholePart" corresponds to. 385 * Note: nDay is in [1-366] format 386 */ 387 nDay = (int) ( wholePart - floor( yearsSince1900 * DAYS_IN_ONE_YEAR ) ); 388 /* Set the tm_yday value. 389 * Note: The day must be converted from [1-366] to [0-365] 390 */ 391 /*pTm->tm_yday = nDay - 1;*/ 392 /* find which month this day corresponds to. 393 */ 394 if( nDay <= 31 ) 395 { 396 pTm->tm_mday = nDay; 397 pTm->tm_mon = 0; 398 } 399 else if( nDay <= ( 59 + leapYear ) ) 400 { 401 pTm->tm_mday = nDay - 31; 402 pTm->tm_mon = 1; 403 } 404 else if( nDay <= ( 90 + leapYear ) ) 405 { 406 pTm->tm_mday = nDay - ( 59 + leapYear ); 407 pTm->tm_mon = 2; 408 } 409 else if( nDay <= ( 120 + leapYear ) ) 410 { 411 pTm->tm_mday = nDay - ( 90 + leapYear ); 412 pTm->tm_mon = 3; 413 } 414 else if( nDay <= ( 151 + leapYear ) ) 415 { 416 pTm->tm_mday = nDay - ( 120 + leapYear ); 417 pTm->tm_mon = 4; 418 } 419 else if( nDay <= ( 181 + leapYear ) ) 420 { 421 pTm->tm_mday = nDay - ( 151 + leapYear ); 422 pTm->tm_mon = 5; 423 } 424 else if( nDay <= ( 212 + leapYear ) ) 425 { 426 pTm->tm_mday = nDay - ( 181 + leapYear ); 427 pTm->tm_mon = 6; 428 } 429 else if( nDay <= ( 243 + leapYear ) ) 430 { 431 pTm->tm_mday = nDay - ( 212 + leapYear ); 432 pTm->tm_mon = 7; 433 } 434 else if( nDay <= ( 273 + leapYear ) ) 435 { 436 pTm->tm_mday = nDay - ( 243 + leapYear ); 437 pTm->tm_mon = 8; 438 } 439 else if( nDay <= ( 304 + leapYear ) ) 440 { 441 pTm->tm_mday = nDay - ( 273 + leapYear ); 442 pTm->tm_mon = 9; 443 } 444 else if( nDay <= ( 334 + leapYear ) ) 445 { 446 pTm->tm_mday = nDay - ( 304 + leapYear ); 447 pTm->tm_mon = 10; 448 } 449 else if( nDay <= ( 365 + leapYear ) ) 450 { 451 pTm->tm_mday = nDay - ( 334 + leapYear ); 452 pTm->tm_mon = 11; 453 } 454 } 455 if( !(dwFlags & VAR_DATEVALUEONLY) ) 456 { 457 /* find the number of seconds in this day. 458 * fractional part times, hours, minutes, seconds. 459 */ 460 pTm->tm_hour = (int) ( decimalPart * 24 ); 461 pTm->tm_min = (int) ( ( ( decimalPart * 24 ) - pTm->tm_hour ) * 60 ); 462 pTm->tm_sec = (int) ( ( ( decimalPart * 24 * 60 ) - ( pTm->tm_hour * 60 ) - pTm->tm_min ) * 60 ); 463 } 464 return TRUE; 465 } 466 return FALSE; 342 double decimalPart = 0.0; 343 double wholePart = 0.0; 344 345 /* Do not process dates smaller than January 1, 1900. 346 * Which corresponds to 2.0 in the windows DATE format. 347 */ 348 if( dateIn < 2.0 ) return FALSE; 349 350 memset(pTm,0,sizeof(*pTm)); 351 352 /* Because of the nature of DATE format which 353 * associates 2.0 to January 1, 1900. We will 354 * remove 1.0 from the whole part of the DATE 355 * so that in the following code 1.0 356 * will correspond to January 1, 1900. 357 * This simplifies the processing of the DATE value. 358 */ 359 dateIn -= 1.0; 360 361 wholePart = (double) floor( dateIn ); 362 decimalPart = fmod( dateIn, wholePart ); 363 364 if( !(dwFlags & VAR_TIMEVALUEONLY) ) 365 { 366 int nDay = 0; 367 int leapYear = 0; 368 double yearsSince1900 = 0; 369 /* Start at 1900, this is where the DATE time 0.0 starts. 370 */ 371 pTm->tm_year = 1900; 372 /* find in what year the day in the "wholePart" falls into. 373 * add the value to the year field. 374 */ 375 yearsSince1900 = floor( (wholePart / DAYS_IN_ONE_YEAR) + 0.001 ); 376 pTm->tm_year += yearsSince1900; 377 /* determine if this is a leap year. 378 */ 379 if( isleap( pTm->tm_year ) ) 380 { 381 leapYear = 1; 382 wholePart++; 383 } 384 385 /* find what day of that year the "wholePart" corresponds to. 386 * Note: nDay is in [1-366] format 387 */ 388 nDay = (int) ( wholePart - floor( yearsSince1900 * DAYS_IN_ONE_YEAR ) ); 389 /* Set the tm_yday value. 390 * Note: The day must be converted from [1-366] to [0-365] 391 */ 392 /*pTm->tm_yday = nDay - 1;*/ 393 /* find which month this day corresponds to. 394 */ 395 if( nDay <= 31 ) 396 { 397 pTm->tm_mday = nDay; 398 pTm->tm_mon = 0; 399 } 400 else if( nDay <= ( 59 + leapYear ) ) 401 { 402 pTm->tm_mday = nDay - 31; 403 pTm->tm_mon = 1; 404 } 405 else if( nDay <= ( 90 + leapYear ) ) 406 { 407 pTm->tm_mday = nDay - ( 59 + leapYear ); 408 pTm->tm_mon = 2; 409 } 410 else if( nDay <= ( 120 + leapYear ) ) 411 { 412 pTm->tm_mday = nDay - ( 90 + leapYear ); 413 pTm->tm_mon = 3; 414 } 415 else if( nDay <= ( 151 + leapYear ) ) 416 { 417 pTm->tm_mday = nDay - ( 120 + leapYear ); 418 pTm->tm_mon = 4; 419 } 420 else if( nDay <= ( 181 + leapYear ) ) 421 { 422 pTm->tm_mday = nDay - ( 151 + leapYear ); 423 pTm->tm_mon = 5; 424 } 425 else if( nDay <= ( 212 + leapYear ) ) 426 { 427 pTm->tm_mday = nDay - ( 181 + leapYear ); 428 pTm->tm_mon = 6; 429 } 430 else if( nDay <= ( 243 + leapYear ) ) 431 { 432 pTm->tm_mday = nDay - ( 212 + leapYear ); 433 pTm->tm_mon = 7; 434 } 435 else if( nDay <= ( 273 + leapYear ) ) 436 { 437 pTm->tm_mday = nDay - ( 243 + leapYear ); 438 pTm->tm_mon = 8; 439 } 440 else if( nDay <= ( 304 + leapYear ) ) 441 { 442 pTm->tm_mday = nDay - ( 273 + leapYear ); 443 pTm->tm_mon = 9; 444 } 445 else if( nDay <= ( 334 + leapYear ) ) 446 { 447 pTm->tm_mday = nDay - ( 304 + leapYear ); 448 pTm->tm_mon = 10; 449 } 450 else if( nDay <= ( 365 + leapYear ) ) 451 { 452 pTm->tm_mday = nDay - ( 334 + leapYear ); 453 pTm->tm_mon = 11; 454 } 455 } 456 if( !(dwFlags & VAR_DATEVALUEONLY) ) 457 { 458 /* find the number of seconds in this day. 459 * fractional part times, hours, minutes, seconds. 460 */ 461 pTm->tm_hour = (int) ( decimalPart * 24 ); 462 pTm->tm_min = (int) ( ( ( decimalPart * 24 ) - pTm->tm_hour ) * 60 ); 463 pTm->tm_sec = (int) ( ( ( decimalPart * 24 * 60 ) - ( pTm->tm_hour * 60 ) - pTm->tm_min ) * 60 ); 464 } 465 return TRUE; 467 466 } 468 467 … … 615 614 LPSTR pNewString = NULL; 616 615 LPSTR strToken = NULL; 617 618 616 619 617 /* Check if we have a valid argument … … 1680 1678 * VariantInit [OLEAUT32.8] 1681 1679 * 1682 * Initializes the Variant. Unlike VariantClear it does not interpret the current1683 * contents of the Variant.1680 * Initializes the Variant. Unlike VariantClear it does not interpret 1681 * the current contents of the Variant. 1684 1682 */ 1685 1683 void WINAPI VariantInit(VARIANTARG* pvarg) 1686 1684 { 1687 TRACE("(%p) ,stub\n",pvarg);1685 TRACE("(%p)\n",pvarg); 1688 1686 1689 1687 memset(pvarg, 0, sizeof (VARIANTARG)); … … 1764 1762 HRESULT res = S_OK; 1765 1763 1766 TRACE("(%p, %p) \n", pvargDest, pvargSrc);1764 TRACE("(%p, %p), vt=%d\n", pvargDest, pvargSrc, V_VT(pvargSrc)); 1767 1765 1768 1766 res = ValidateVariantType( V_VT(pvargSrc) ); … … 1797 1795 { 1798 1796 /* In the case of by value we need to 1799 * copy the actual lvalue. In the case of1797 * copy the actual value. In the case of 1800 1798 * VT_BSTR a copy of the string is made, 1801 * if VT_DISPATCH or VT_IUNKNOWN AddRef fis1799 * if VT_DISPATCH or VT_IUNKNOWN AddRef is 1802 1800 * called to increment the object's reference count. 1803 1801 */ … … 1805 1803 { 1806 1804 case( VT_BSTR ): 1807 V_UNION(pvargDest,bstrVal) = S ysAllocString( V_UNION(pvargSrc,bstrVal) );1805 V_UNION(pvargDest,bstrVal) = SYSDUPSTRING( V_UNION(pvargSrc,bstrVal) ); 1808 1806 break; 1809 1807 case( VT_DISPATCH ): … … 1894 1892 { 1895 1893 case( VT_BSTR ): 1896 V_UNION(pvargDest,bstrVal) = S ysAllocString( *(V_UNION(pvargSrc,pbstrVal)) );1894 V_UNION(pvargDest,bstrVal) = SYSDUPSTRING( *(V_UNION(pvargSrc,pbstrVal)) ); 1897 1895 break; 1898 1896 case( VT_DISPATCH ): … … 1986 1984 VariantInit( &varg ); 1987 1985 1988 TRACE("(%p, %p, %ld, %u, %u) ,stub\n", pvargDest, pvargSrc, lcid, wFlags, vt);1986 TRACE("(%p, %p, %ld, %u, %u) vt=%d\n", pvargDest, pvargSrc, lcid, wFlags, vt, V_VT(pvargSrc)); 1989 1987 1990 1988 /* validate our source argument. … … 3251 3249 */ 3252 3250 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut) { 3253 /* FIXME */3251 FIXME("([cyIn], %08lx, %08lx, %p), stub.\n", lcid, dwFlags, pbstrOut); 3254 3252 return E_NOTIMPL; 3255 3253 } … … 3316 3314 TRACE("( %d, %ld, %ld, %p ), stub\n", boolIn, lcid, dwFlags, pbstrOut ); 3317 3315 3318 if( boolIn == VARIANT_FALSE ) 3319 { 3320 sprintf( pBuffer, "False" ); 3321 } 3322 else 3323 { 3324 sprintf( pBuffer, "True" ); 3325 } 3316 sprintf( pBuffer, (boolIn == VARIANT_FALSE) ? "False" : "True" ); 3326 3317 3327 3318 *pbstrOut = StringDupAtoBstr( pBuffer ); … … 3392 3383 TRACE("( %d, %p ), stub\n", sIn, pboolOut ); 3393 3384 3394 if( sIn == 0 ) 3395 { 3396 *pboolOut = VARIANT_FALSE; 3397 } 3398 else 3399 { 3400 *pboolOut = VARIANT_TRUE; 3401 } 3385 *pboolOut = (sIn) ? VARIANT_TRUE : VARIANT_FALSE; 3402 3386 3403 3387 return S_OK; … … 3411 3395 TRACE("( %ld, %p ), stub\n", lIn, pboolOut ); 3412 3396 3413 if( lIn == 0 ) 3414 { 3415 *pboolOut = VARIANT_FALSE; 3416 } 3417 else 3418 { 3419 *pboolOut = VARIANT_TRUE; 3420 } 3397 *pboolOut = (lIn) ? VARIANT_TRUE : VARIANT_FALSE; 3421 3398 3422 3399 return S_OK; … … 3430 3407 TRACE("( %f, %p ), stub\n", fltIn, pboolOut ); 3431 3408 3432 if( fltIn == 0.0 ) 3433 { 3434 *pboolOut = VARIANT_FALSE; 3435 } 3436 else 3437 { 3438 *pboolOut = VARIANT_TRUE; 3439 } 3409 *pboolOut = (fltIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE; 3440 3410 3441 3411 return S_OK; … … 3449 3419 TRACE("( %f, %p ), stub\n", dblIn, pboolOut ); 3450 3420 3451 if( dblIn == 0.0 ) 3452 { 3453 *pboolOut = VARIANT_FALSE; 3454 } 3455 else 3456 { 3457 *pboolOut = VARIANT_TRUE; 3458 } 3421 *pboolOut = (dblIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE; 3459 3422 3460 3423 return S_OK; … … 3468 3431 TRACE("( %f, %p ), stub\n", dateIn, pboolOut ); 3469 3432 3470 if( dateIn == 0.0 ) 3471 { 3472 *pboolOut = VARIANT_FALSE; 3473 } 3474 else 3475 { 3476 *pboolOut = VARIANT_TRUE; 3477 } 3433 *pboolOut = (dateIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE; 3478 3434 3479 3435 return S_OK; … … 3517 3473 ret = DISP_E_TYPEMISMATCH; 3518 3474 } 3519 else if( dValue == 0.0 )3520 {3521 *pboolOut = VARIANT_FALSE;3522 }3523 3475 else 3524 { 3525 *pboolOut = VARIANT_TRUE; 3526 } 3476 *pboolOut = (dValue == 0.0) ? 3477 VARIANT_FALSE : VARIANT_TRUE; 3527 3478 } 3528 3479 } … … 3540 3491 TRACE("( %c, %p ), stub\n", cIn, pboolOut ); 3541 3492 3542 if( cIn == 0 ) 3543 { 3544 *pboolOut = VARIANT_FALSE; 3545 } 3546 else 3547 { 3548 *pboolOut = VARIANT_TRUE; 3549 } 3493 *pboolOut = (cIn == 0) ? VARIANT_FALSE : VARIANT_TRUE; 3550 3494 3551 3495 return S_OK; … … 3559 3503 TRACE("( %d, %p ), stub\n", uiIn, pboolOut ); 3560 3504 3561 if( uiIn == 0 ) 3562 { 3563 *pboolOut = VARIANT_FALSE; 3564 } 3565 else 3566 { 3567 *pboolOut = VARIANT_TRUE; 3568 } 3505 *pboolOut = (uiIn == 0) ? VARIANT_FALSE : VARIANT_TRUE; 3569 3506 3570 3507 return S_OK; … … 3578 3515 TRACE("( %ld, %p ), stub\n", ulIn, pboolOut ); 3579 3516 3580 if( ulIn == 0 ) 3581 { 3582 *pboolOut = VARIANT_FALSE; 3583 } 3584 else 3585 { 3586 *pboolOut = VARIANT_TRUE; 3587 } 3517 *pboolOut = (ulIn == 0) ? VARIANT_FALSE : VARIANT_TRUE; 3588 3518 3589 3519 return S_OK; … … 4111 4041 TRACE("( %f, %p ), stub\n", dblIn, pulOut ); 4112 4042 4113 4043 dblIn = round( dblIn ); 4114 4044 if( dblIn < UI4_MIN || dblIn > UI4_MAX ) 4115 4045 { 4116 4046 return DISP_E_OVERFLOW; 4117 4047 } 4118 4048 4119 4049 *pulOut = (ULONG) dblIn; … … 4129 4059 TRACE("( %f, %p ), stub\n", dateIn, pulOut ); 4130 4060 4131 4132 4061 dateIn = round( dateIn ); 4062 if( dateIn < UI4_MIN || dateIn > UI4_MAX ) 4133 4063 { 4134 4064 return DISP_E_OVERFLOW; … … 4195 4125 */ 4196 4126 HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pcyOut) { 4197 pcyOut->s.Hi = 0;4198 pcyOut->s.Lo = ((ULONG)bIn) * 10000;4199 4200 return S_OK;4127 pcyOut->s.Hi = 0; 4128 pcyOut->s.Lo = ((ULONG)bIn) * 10000; 4129 4130 return S_OK; 4201 4131 } 4202 4132 … … 4206 4136 */ 4207 4137 HRESULT WINAPI VarCyFromI2(short sIn, CY* pcyOut) { 4208 if (sIn < 0) pcyOut->s.Hi = -1;4209 else pcyOut->s.Hi = 0;4210 pcyOut->s.Lo = ((ULONG)sIn) * 10000;4211 4212 return S_OK;4138 if (sIn < 0) pcyOut->s.Hi = -1; 4139 else pcyOut->s.Hi = 0; 4140 pcyOut->s.Lo = ((ULONG)sIn) * 10000; 4141 4142 return S_OK; 4213 4143 } 4214 4144 … … 4269 4199 */ 4270 4200 HRESULT WINAPI VarCyFromStr(OLECHAR *strIn, LCID lcid, ULONG dwFlags, CY *pcyOut) { 4271 /* FIXME */4272 4201 FIXME("(%p, %08lx, %08lx, %p), stub.\n", strIn, lcid, dwFlags, pcyOut); 4202 return E_NOTIMPL; 4273 4203 } 4274 4204 … … 4414 4344 4415 4345 /********************************************************************** 4416 * VariantTimeToDosDateTime [OLEAUT32. ??]4346 * VariantTimeToDosDateTime [OLEAUT32.13] 4417 4347 * Convert variant representation of time to the date and time representation 4418 4348 * stored in dos. … … 4440 4370 4441 4371 4372 /*********************************************************************** 4373 * SystemTimeToVariantTime [OLEAUT32.184] 4374 */ 4442 4375 HRESULT WINAPI SystemTimeToVariantTime( LPSYSTEMTIME lpSystemTime, double *pvtime ) 4443 4376 { … … 4488 4421 } 4489 4422 4423 /*********************************************************************** 4424 * VariantTimeToSystemTime [OLEAUT32.185] 4425 */ 4490 4426 HRESULT WINAPI VariantTimeToSystemTime( double vtime, LPSYSTEMTIME lpSystemTime ) 4491 4427 { … … 4603 4539 } 4604 4540 4541 /*********************************************************************** 4542 * VarUdateFromDate [OLEAUT32.331] 4543 */ 4605 4544 HRESULT WINAPI VarUdateFromDate( DATE datein, ULONG dwFlags, UDATE *pudateout) 4606 4545 { … … 4635 4574 } 4636 4575 4576 /*********************************************************************** 4577 * VarDateFromUdate [OLEAUT32.330] 4578 */ 4637 4579 HRESULT WINAPI VarDateFromUdate(UDATE *pudateout, 4638 4580 ULONG dwFlags, DATE *datein)
Note:
See TracChangeset
for help on using the changeset viewer.