SHCreateStdEnumFmtEtc ?

Windows specific questions.
stephanbrunker
Posts: 62
Joined: Nov 02, 2013 14:57

SHCreateStdEnumFmtEtc ?

Postby stephanbrunker » Jan 25, 2014 23:04

Hello,

realizing a drag & drop Operation is somewhat tricky. For DropTarget, there is an example in the "examples" Folder of FreeBasic. But for the IDropSource, you Need also an IDataObject Interface, which contains the EnumFormatEtc method. And for this, there is a function in the API:

Code: Select all

Declare Function SHCreateStdEnumFmtEtc Alias "SHCreateStdEnumFmtEtc" _
      ( ByVal As UINT, _
          () As FORMATETC, _
        Byval As IEnumFORMATETC Ptr) As HRESULT


in the MSDN:http://msdn.microsoft.com/en-us/library/windows/desktop/bb762148(v=vs.85).aspx

Do I miss something, or is there any chance that i can use this function? It works only for XP or higher, but this is not really a problem, because support for XP is already going to be stopped by Microsoft ... or have I to write my own Interface? This link is really helpful: http://www.catch22.net/tuts/enumerating-formatetc, but if i can avoid it ...
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: SHCreateStdEnumFmtEtc ?

Postby MichaelW » Jan 25, 2014 23:41

Per the linked page it looks like Microsoft started moving away from SHCreateStdEnumFmtEtc 6-7 years ago with the release of Windows XP SP3:

SHCreateStdEnumFmtEtc is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.

Minimum supported client Windows XP [desktop apps only]
End of client support Windows XP with SP2

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 6 guests