MSFN Forum: DLL Invokation using an Application. - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

DLL Invokation using an Application. DLL procedure invokation in an EXE. Rate Topic: -----

#1 User is offline   rajeshckk 

  • Group: Members
  • Posts: 1
  • Joined: 15-January 08

Posted 15 January 2008 - 04:10 AM

I am a newbie to this dll invokation.

I have a dll called abc.dll and this has three methods in it (a,b,c)

when i need to write an console app to invoke the dll, what methods should i follow.

In the header file

#import "abc.dll"

int main()
{

CoInitialize(NULL);

p = CreateInstance();

p->a();
p->b();
p->c();

Release();
CoUninitialize();

}

If could get a code sample that would be really great and point me to the reference as to which files i should be looking at to get the instantiation of the com object.

Thanks,
Rajesh.


#2 User is offline   Zxian 

  • Scroll up - see the Google bar?
  • Group: Super Moderator
  • Posts: 5,063
  • Joined: 30-September 04
  • OS:none specified
  • Country: Country Flag

Posted 15 January 2008 - 04:29 AM

Moved to correct forum.

#3 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 15 January 2008 - 01:35 PM

#import doesnt work, you have to use direct Win32 API commands. More info aon creating and using DLL's here
MS Page 1
Flipcode
More info
Easy Example


Hope these help you

This post has been edited by phkninja: 15 January 2008 - 01:35 PM


#4 User is offline   jdoe 

  • Advanced Member
  • PipPipPip
  • Group: Banned
  • Posts: 314
  • Joined: 02-May 04

Posted 15 January 2008 - 05:51 PM

These two links are a good start to understand how to use COM in your applications.

Introduction to COM - What It Is and How to Use It
COM in plain C

This post has been edited by jdoe: 15 January 2008 - 05:53 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy