replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Calling CoTaskMemAlloc from within FTN95
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calling CoTaskMemAlloc from within FTN95

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Mon Apr 15, 2013 4:58 pm    Post subject: Calling CoTaskMemAlloc from within FTN95 Reply with quote

For reasons too complicated to go into here, i've been advised by a 3rd party, that to use their DLL, I need to allocate string memory using CoTaskMemAlloc before passing the buffer to them. They know nothing about FTN95, I know nothing about their DLL.

What combniation of STDCALL or whatever do I need to implement a call to the following?

http://msdn.microsoft.com/en-gb/library/windows/desktop/ms692727%28v=vs.85%29.aspx

TIA

K
Back to top
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Tue Apr 16, 2013 3:39 pm    Post subject: Reply with quote

ok, sussed it... i think:
Code:

    STDCALL CoTaskMemAlloc_ 'CoTaskMemAlloc'(VAL) : INTEGER*8
 
    INTEGER*8   ::  ILOCN

    ILOCN   =  CoTaskMemAlloc_(260)


and include OLE32.DLL in my link.

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Apr 16, 2013 4:58 pm    Post subject: Reply with quote

You would normally use INTEGER*4 for the returned pointer but it probably won't do any harm to use INTEGER*8.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group