Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jan : C++ to Delphi translation question
| Subject: | C++ to Delphi translation question |
| Posted by: | "Jans Berger" (nomail@nospam.com) |
| Date: | 19 Jan 2008 03:50:20 |
Hi,
I'm trying to use the following function :
HRESULT ExposeSnapshot(
[in] VSS_ID SnapshotId,
[in] VSS_PWSZ wszPathFromRoot,
[in] LONG lAttributes,
[in] VSS_PWSZ wszExpose,
[out] VSS_PWSZ* pwszExposed
);
My Delphi translation is :
Function ExposeSnapshot(SnapID: TGUID; wszPathFromRoot: PWideChar; lAttributes: LongInt; wszExpose: PWideChar; var pwszExposed: PWideChar) : HRESULT; StdCall;
Nevertheless, I always get as result the HRESULT which stands for "invalid parameters". So is my translation wrong ?
Can someone post an example of code which will call this function with "good" parameters ? I never used the PWideChar type before so I don't know what I've to allocate, to pass by ref, and so on.
Thanks in advance ! (and sorry for my English !)
Jans