SHCreateStdEnumFmtEtc ?

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

SHCreateStdEnumFmtEtc ?

Post by stephanbrunker »

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 ... s.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 ?

Post by MichaelW »

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
Post Reply