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

struct.vcx is not required here. You seems do not have structures here that require to be wrapped into a single string and passes as a single parameter to the function.

Take a look to the CLSHEAP. I just sent it to you by EMail so you will not search it. All that you require is to allocate the string in the memory, get a pointer to that string as integer value, than pass that integer value by reference to the function. This is to pass the value to the function. If this is the returning value, do opposite - receive integer value in the variable passe dby reference to the function. In that variable you will get a pointer to the allocated memory that contains the result string. Get that string using that pointer. In the CLSHEAP.PRG you will find how to do it, or just use that class to work with pointers.

HTH.

>And once again hi,
>
>I had a look at your pointers.vcx and the struct.vcx from christoff.
>But I'm not able to put things up, and have the FindMimeFromData return a comprehensive result.
>
>Meaning that I don't get it quiet right how to address the pointers to the API call.
>Neither do I really understand what to create with the classes (a struct or a string), to pass on to the API call.
>Also don't I know if I need the value, passed on to the pointers/struct class,
>to foresee with the null terminating character (chr(0)).
>
>If somebody could help me out on this with some real hands on examples.
>for example how to create the pointer from within VFP.
>How to pass it on to the declared API FindMimeFromData DLL.
>And how to retrtieve the result from the FindMimeFromData function.
>
>Regards,
>
>Yves.
>
>
>>Hi!
>>
>>Hmm, I do not remember any case I required to verify if some file extension is really matchesto its content. I just used the extension to determine file type. If file does not contain what it must contain, the routine that uses that file usually throws the error to user to let user know that file is invalid. Why you need that feature?
>>
>>As I suggested, ppwzMimeOut is double-pointer (pointer to the pointer). Just a string reference gets a garbage from the memory because it is a single pointer pointer. You require to use some tools or API functions to allocate memory for that buffer, pass a pointer to it to the API function, then get a result from that memory by API function calls. There is a tool in the Files section or somewhere in teh UT messages that allows to handle pointers in the VFP.
>>
>>HTH.
>>
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
Reply
Map
View

Click here to load this message in the networking platform