Click here to Skip to main content
16,012,173 members
Home / Discussions / COM
   

COM

 
GeneralRe: ActiveX Control Pin
HakunaMatada27-Nov-06 21:29
HakunaMatada27-Nov-06 21:29 
GeneralRe: ActiveX Control Pin
Roger Stoltz27-Nov-06 21:49
Roger Stoltz27-Nov-06 21:49 
QuestionWMI Pin
abhiramsss27-Nov-06 9:38
abhiramsss27-Nov-06 9:38 
QuestionUnhandled Exception in Popup blocker code Pin
georgekjolly25-Nov-06 3:56
georgekjolly25-Nov-06 3:56 
QuestionIE window manipulation using web browser object Pin
georgekjolly25-Nov-06 2:22
georgekjolly25-Nov-06 2:22 
QuestionAccess Violation occur when use goForward() or goBack() method in IWebBrowser2 Pin
Lee bo24-Nov-06 3:30
Lee bo24-Nov-06 3:30 
AnswerRe: Access Violation occur when use goForward() or goBack() method in IWebBrowser2 Pin
Roger Stoltz24-Nov-06 4:55
Roger Stoltz24-Nov-06 4:55 
QuestionAdding function to interface. Pin
Suresh H22-Nov-06 18:15
Suresh H22-Nov-06 18:15 
Hello All,

I have small and simple COM program to access a Add function in Dll and I am accessing this function from main program.
For the simple add function it is working, interface and dll files are working properly.

For this interface I am trying to add one more function by name getdate() which of return Char* .. can any one please help how to declare the getdate() function in interface ???

Below are declaration and files with there names ….


// File interface.h
// This file contains interface related declarations.

#ifndef _A_INTERFACE_H_
#define _A_INTERFACE_H_

DECLARE_INTERFACE_(IMyA,IUnknown)
{
STDMETHOD_(LONG,MyAdd)(INT,INT) PURE;
};

--- ---

--- ---


file :- MyA.h

class CMyA : public CCmdTarget
{
DECLARE_DYNCREATE(CMyA)

CMyA();

-- -- -- - - -- -- -- - -

-- -- -- - - -- -- -- - -

-- -- - -

-- -- - --- -- -- - --- -- -- - -

protected:
virtual ~CMyA();
DECLARE_MESSAGE_MAP()

BEGIN_INTERFACE_PART(MyAObj,IMyA)
STDMETHOD_(LONG,MyAdd) (INT,INT);
END_INTERFACE_PART(MyAObj)

DECLARE_INTERFACE_MAP()
DECLARE_OLECREATE(CMyA)

};


// MyA.cpp : implementation file

-- -- -- --- -- --


//IMyA Functions
STDMETHODIMP_ (LONG)
CMyA::XMyAObj::MyAdd (INT x,INT y)
{
return (x+y);
}


-------------------------------

// function to be added to Interface can u please help me how to declare this function in interface.

char* getDate()
{
struct tm *newtime;
char am_pm[] = "AM";
-- - - -
--- - -- - - -

}



Thanking you,
Suresh H.
QuestionHow can i call C# interface function from C++ ( visual 6 ) application ? Pin
Yanshof22-Nov-06 0:55
Yanshof22-Nov-06 0:55 
AnswerRe: How can i call C# interface function from C++ ( visual 6 ) application ? Pin
ThatsAlok3-Dec-06 19:33
ThatsAlok3-Dec-06 19:33 
QuestionHow do you implement an Event Sink without a Type Library? Pin
Bathory's Curse21-Nov-06 7:01
Bathory's Curse21-Nov-06 7:01 
AnswerRe: How do you implement an Event Sink without a Type Library? Pin
Stephen Hewitt21-Nov-06 11:50
Stephen Hewitt21-Nov-06 11:50 
GeneralRe: How do you implement an Event Sink without a Type Library? Pin
Bathory's Curse21-Nov-06 13:44
Bathory's Curse21-Nov-06 13:44 
GeneralRe: How do you implement an Event Sink without a Type Library? Pin
Stephen Hewitt21-Nov-06 14:38
Stephen Hewitt21-Nov-06 14:38 
GeneralRe: How do you implement an Event Sink without a Type Library? Pin
Bathory's Curse22-Nov-06 10:05
Bathory's Curse22-Nov-06 10:05 
Questionhow to know the name of dll? Pin
kalaveer21-Nov-06 1:05
kalaveer21-Nov-06 1:05 
QuestionCom exe and dll Pin
ashokvishnu20-Nov-06 16:42
ashokvishnu20-Nov-06 16:42 
AnswerRe: Com exe and dll Pin
Roger Stoltz20-Nov-06 21:43
Roger Stoltz20-Nov-06 21:43 
QuestionPorting D/COM OLE Server from W2K to WXP : Issues Pin
sebastien_pelle20-Nov-06 5:29
sebastien_pelle20-Nov-06 5:29 
QuestionConvert pdf to tiff Pin
Dudi Avramov20-Nov-06 3:57
Dudi Avramov20-Nov-06 3:57 
QuestionNewWIndow2 Event Sink problem Pin
yokos117-Nov-06 12:26
yokos117-Nov-06 12:26 
GeneralRe: NewWIndow2 Event Sink problem Pin
prasad_som19-Nov-06 18:31
prasad_som19-Nov-06 18:31 
Questionmemory issues Releasing Interface in VB 6 Pin
el_scrub16-Nov-06 22:34
el_scrub16-Nov-06 22:34 
AnswerRe: memory issues Releasing Interface in VB 6 Pin
prasad_som16-Nov-06 23:19
prasad_som16-Nov-06 23:19 
GeneralRe: memory issues Releasing Interface in VB 6 Pin
el_scrub16-Nov-06 23:38
el_scrub16-Nov-06 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.