I am new to IVF and I am attempting to display a BrowseForFolder dialog. I downloaded some code from the IVF forum (CmnDlgChooseFolder sample code posted by Paul-Curtis 02-24-2005) but I am having a couple of problems with it.
1. It calls CoTaskMemFree to free the memory allocated by the SHBrowseForFolder function. However CoTaskMemFree generates an unresolved exrernal error, even though I have the "use ole32" statement, in placeand I have added ole32.lib to the list of default libraries for the linker. I noticed that ole32.f90 does not include an interface for CoTaskMemFree, and so I have tried to create my own interface, but I can't get it right. Does anyone know how to use these functions correctly? Or is there another way to free the memory?
2. My BrowseForFolder dialog displays behind all other windows, instead of on top. Any idea why that would happen?
Help would begreatly appreciated - thanks very much.