Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FindMimeFromData
Message
From
29/05/2001 06:08:42
 
 
To
29/05/2001 05:23:32
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00512103
Message ID:
00512118
Views:
10
Hi!

Try following:

DECLARE INTEGER FindMimeFromData IN ??? integer pBC, ;
string @pwzUrl, string @pBuffer, integer cbSize, string @pwzMimeProposed,;
integer dwMimeFlags, string @ppwzMimeOut, integer dwReserved

If you want to use NULL value for pwzUrl, pBuffer or pwzMimeProposed parameters, declare these parameters as integer type and pass zero to function. I'm also not sure about ppwzMimeOut parameter. If it is double-pointer, you will require to use the API functions to allocate the memory for that parameter.

HTH.

P.S.
Well, if you meant the file type of the disk file in Windows, it is determined by Windows using the file extension. And I do not remember any function that verifies if, for example, '.DBF' file really is not a text file. As about the FindMimeFromData function, it just "Determines the MIME type from the data provided." as I see in the MSDN help. If you meant something else, well, be more exact in your questions next time.


>Hi,
>
>I was looking for an API call to have the file type defined based on its contents.
>I think the FindMimeFromData function does it all.
>
>Now I have the problem of not knowing how to address this from within VFP.
>
>I know I have to use the DECLARE, but then I'm stocked with the arguments and the types to pass on to the DLL.
>
>Please, can anybody put a light on this??
>
>Here is the function syntax.
>
>HRESULT FindMimeFromData(
> LPBC pBC,
> LPCWSTR pwzUrl,
> LPVOID pBuffer,
> DWORD cbSize,
> LPCWSTR pwzMimeProposed,
> DWORD dwMimeFlags,
> LPWSTR *ppwzMimeOut,
> DWORD dwReserved
>);
>
>
>Thanks in advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform