Changeset 795 for trunk/src/shell32/new/shelllink.cpp
- Timestamp:
- Sep 2, 1999, 7:25:19 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/new/shelllink.cpp
r791 r795 26 26 #include "shlguid.h" 27 27 28 #include <heapstring.h> 28 29 #include <misc.h> 29 30 … … 67 68 #include "poppack.h" 68 69 69 static ICOM_VTABLE(IShellLink) slvt;70 static ICOM_VTABLE(IShellLinkW) slvtw;71 static ICOM_VTABLE(IPersistFile) pfvt;72 static ICOM_VTABLE(IPersistStream) psvt;70 //static ICOM_VTABLE(IShellLink) slvt; 71 //static ICOM_VTABLE(IShellLinkW) slvtw; 72 //static ICOM_VTABLE(IPersistFile) pfvt; 73 //static ICOM_VTABLE(IPersistStream) psvt; 73 74 74 75 /* IShellLink Implementation */ … … 295 296 IStream* pLoadStream) 296 297 { 297 PLINK_HEADER lpLinkHeader = HeapAlloc(GetProcessHeap(), 0, LINK_HEADER_SIZE);298 PLINK_HEADER lpLinkHeader = (PLINK_HEADER)HeapAlloc(GetProcessHeap(), 0, LINK_HEADER_SIZE); 298 299 ULONG dwBytesRead; 299 300 DWORD ret = E_FAIL; … … 316 317 if ((lpLinkHeader->MagicStr == 0x0000004CL) && IsEqualIID(&lpLinkHeader->MagicGuid, &CLSID_ShellLink)) 317 318 { 318 lpLinkHeader = HeapReAlloc(GetProcessHeap(), 0, lpLinkHeader, LINK_HEADER_SIZE+lpLinkHeader->PidlSize);319 lpLinkHeader = (PLINK_HEADER)HeapReAlloc(GetProcessHeap(), 0, lpLinkHeader, LINK_HEADER_SIZE+lpLinkHeader->PidlSize); 319 320 if (lpLinkHeader) 320 321 { … … 404 405 405 406 /************************************************************************** 406 * IShellLink_Constructor407 */408 IShellLink * IShellLink_Constructor(BOOL bUnicode)409 { IShellLinkImpl * sl;410 411 sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));412 sl->ref = 1;413 sl->lpvtbl = &slvt;414 sl->lpvtblw = &slvtw;415 sl->lpvtblPersistFile = &pfvt;416 sl->lpvtblPersistStream = &psvt;417 418 TRACE("(%p)->()\n",sl);419 shell32_ObjCount++;420 return bUnicode ? (IShellLink *) &(sl->lpvtblw) : (IShellLink *)sl;421 }422 423 /**************************************************************************424 407 * IShellLink_QueryInterface 425 408 */ … … 902 885 }; 903 886 887 /************************************************************************** 888 * IShellLink_Constructor 889 */ 890 IShellLink * IShellLink_Constructor(BOOL bUnicode) 891 { IShellLinkImpl * sl; 892 893 sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl)); 894 sl->ref = 1; 895 sl->lpvtbl = &slvt; 896 sl->lpvtblw = &slvtw; 897 sl->lpvtblPersistFile = &pfvt; 898 sl->lpvtblPersistStream = &psvt; 899 900 TRACE("(%p)->()\n",sl); 901 shell32_ObjCount++; 902 return bUnicode ? (IShellLink *) &(sl->lpvtblw) : (IShellLink *)sl; 903 } 904 905
Note:
See TracChangeset
for help on using the changeset viewer.