|
if the clients are in deifferent processes, that means each clients is in different department, so it's impossible, I've never done with proxy & stub, so I'm not sure if it is possible, by my personal assumption, it's imposible, because proxy &stub is used to marshal data between client and com server. it doesn't change the com's mechanism. hope I can be understood.
give a hand,have a heart
|
|
|
|
|
I don't have Essential COM by Don Box with me tonight, so I can't cite any specifics. But I do remember him advising AGAINST using singletons as described in a post below. If I recall correctly, the major concerns were performance, as the singleton would become a major bottleneck in a distributed system (I assume your system is a distributed one, as you mention multiple clients).
Either try to find the book in your library, buy it, or try googling on "COM singleton Don Box".
Good music: In my rosary[^]
|
|
|
|
|
Is there any way that i can export VC++.Net Basic STL Data types in a DLL
written using VC++.Net call that function returning the value as STL data type of .Net , from a C# program ?
|
|
|
|
|
is there any proper way of exporting the .Net Data types such as
[std::string] from a DLL written in VC++.Net to a calling program written in C#
|
|
|
|
|
Hi,
I want to develop GUI-based plugin for Win32 IDE. I want to add a menu item to VC++ IDE. I m a beginner in COM & ATL programming, but I suppose I can use COM & ATL to create GUI plugin for VC++ editor. Please suggest/help/direct/guide me for same?
|
|
|
|
|
I have a dialog based application very simple (visual c++ .net). i added a windows media player control to the dialog resource. next i gave an id IDC_PLAYER. next i added a variable called m_ctrlPlayer(Add Variable). I have also a button (play) and below is the event handler for that button.
void CWindowMediaDlg::OnBnClickedPlay()
{
// TODO: Add your control notification handler code here
m_ctrlPlayer.GetControls().play();
}
i get this error when i try to compile the project....
error C2039: 'GetControls' : is not a member of 'COcx1'
ocx1.h(11) : see declaration of 'COcx1'
error C2228: left of '.play' must have class/struct/union type
and here is how COcx1 looks...
#pragma once
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.
/////////////////////////////////////////////////////////////////////////////
// COcx1 wrapper class
class COcx1 : public CWnd
{
protected:
DECLARE_DYNCREATE(COcx1)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x6BF52A52, 0x394A, 0x11D3, { 0xB1, 0x53, 0x0, 0xC0, 0x4F, 0x79, 0xFA, 0xA6 } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID);
}
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey);
}
// Attributes
public:
enum
{
amvUninitialized = 0,
amvLoading = 1,
amvInteractive = 3,
amvComplete = 4
}ReadyStateConstants;
enum
{
mpStopped = 0,
mpPaused = 1,
mpPlaying = 2,
mpWaiting = 3,
mpScanForward = 4,
mpScanReverse = 5,
mpClosed = 6
}MPPlayStateConstants;
enum
{
mpDefaultSize = 0,
mpHalfSize = 1,
mpDoubleSize = 2,
mpFullScreen = 3,
mpFitToSize = 4,
mpOneSixteenthScreen = 5,
mpOneFourthScreen = 6,
mpOneHalfScreen = 7
}MPDisplaySizeConstants;
enum
{
mpReadyStateUninitialized = 0,
mpReadyStateLoading = 1,
mpReadyStateInteractive = 3,
mpReadyStateComplete = 4
}MPReadyStateConstants;
enum
{
mpTime = 0,
mpFrames = 1
}MPDisplayModeConstants;
enum
{
mpShowURL = 0,
mpClipURL = 1,
mpBannerURL = 2
}MPMoreInfoType;
enum
{
mpShowFilename = 0,
mpShowTitle = 1,
mpShowAuthor = 2,
mpShowCopyright = 3,
mpShowRating = 4,
mpShowDescription = 5,
mpShowLogoIcon = 6,
mpClipFilename = 7,
mpClipTitle = 8,
mpClipAuthor = 9,
mpClipCopyright = 10,
mpClipRating = 11,
mpClipDescription = 12,
mpClipLogoIcon = 13,
mpBannerImage = 14,
mpBannerMoreInfo = 15,
mpWatermark = 16
}MPMediaInfoType;
enum
{
dvdMenu_Title = 2,
dvdMenu_Root = 3,
dvdMenu_Subpicture = 4,
dvdMenu_Audio = 5,
dvdMenu_Angle = 6,
dvdMenu_Chapter = 7
}DVDMenuIDConstants;
enum
{
mpShowDialogHelp = 0,
mpShowDialogStatistics = 1,
mpShowDialogOptions = 2,
mpShowDialogContextMenu = 3
}MPShowDialogConstants;
// Operations
public:
};
someone pleaze tell me how i fix this problem. thax
thanx hussein
|
|
|
|
|
Hi,
I want to know how to get CLSID of a particular activex control given its name. Is there any API to do so?
|
|
|
|
|
Hi,
Here is the API to get the CLSID of the activex control.
CLSIDFromProgID(...)
Hope this would help.
Cheers,
Vishal
|
|
|
|
|
Hi,
Yes i have tried this API but not succesful. If AnalogMeter is my activeX control then i have used
CLSID clsid;
CLSIDFromProgID(L"AnalogMeter", &clsid);
This gives error ....how to do it? how to pass activeX name as parameter to this API?
|
|
|
|
|
The first parameter for CLSIDFromProgID has to be the PROGID
Like for MS-Word, the PROGID is "Word.Application.9"
You can get PROGID from HKEY_CLASSES_ROOT
BTW what is the error you are getting ?
You can see the error using the API GetLastError()
Have fun !
Cheers,
Vishal
|
|
|
|
|
Hi
what visahlmore was written is quite correct. but to describe more, I should note that ClassID is assigned to a class not an activex while an activex file can have one or more classes to export.
Usually the class is named like "ActiveXName.ClassName" exactly the same string that you should use in CreateObject API to make an instance of the class.
You can easily also find the class id in the following address in registry:
HKEY_CLASSES_ROOT\ActiveXName.ClassName\CLSID
|
|
|
|
|
Thanks, My problem is solved. One more thing, i need to show selected activex images in a ToolBox on start of application and allow user to drag n drop controls onto the container...Just like we do while designing a dialog box(adding buttons,etc).
Any help on how to do it?
|
|
|
|
|
Hello
I want to use namespace in a com atl project in VC6. I don't know how i have to do this. I want to use this dll in C# and it will be nice to have namespace.
Tahnks,
Mihai
|
|
|
|
|
which COM support IVR(interactive voice response) on telephone by using asp.net
|
|
|
|
|
how to receive telephone calls in asp.net and automatically answer them by playing wave file . Is sound modem is compulsory for handling cable based telephone. if so plz tell its name.
i will be thankful if somebody provides help on this
|
|
|
|
|
Hello
I need to make a COM-DLL for use in VB and C# projects in vc6. I don't know how to start the vc project (what kind of new project), how i can see this dll from vb or c#. I need some documentation/sample.
Thanks,
Mihai
|
|
|
|
|
Can somebody tell me hoe to read AVI header of an AVI file using Visual C++.
Thanks in advance.
|
|
|
|
|
I have a project that uses a ActiveX that refers to a COM object, this project is runing on a server and the ActiveX should be downloaded onto the client. This does not work, but if I copy my COM project over to the client and compile it there the project on the server functions great.
My questing is this....
What do I have to do to register the COM project on the client(whithout copying the project and compiling it)
Spaz
|
|
|
|
|
You need to register it on the client machine using a simple line of code.
just try to run regsvr32.exe /s "LocalActiveXFile" on the clinet machine to register the ActiveX and then easily use it.
Hint:
When you compile a COM component, the compiler automatically does the registeration process which is done simply by running the line of code I introduced.
Hope it was helpful
|
|
|
|
|
hi
can somebody tell me why the size of the property page of the controls created using MFC is restricted to 250*62 DLU (dialog units )standard.
if i build the project in debug mode i get a warning message but if i build it in release mode i dont get any warning message. can anyone tell me that will my program face any problem if i increase the size of the property page than that of the standard one.
tulika
|
|
|
|
|
Hi,
I want to develop GUI-based plugin for Win32 IDE, like I want to add a menu item to VC++ IDE. I m a amateur in COM & ATL programming, but I suppose I can use COM & ATL to create GUI plugin for VC++ editor. Please suggest/help/direct/guide me for same?
- Manish
|
|
|
|
|
hello,
i use the ATl write a word2000 addin,and add a button into the word toolbars,and now i want to add a picture into the word document when i hit the button,this picture can be a bmp or jpeg.after i insert the picture i can drag it to a proper location.
i tried a long time,but in vain,who can help me?
|
|
|
|
|
Hello Friends,
What is the difference between ActiveX Component and COM Component?
Neelesh K J Jain.
|
|
|
|
|
They are one and the same thing! You probably wanted to ask this:
What is the difference between ActiveX Control and COM Component?
A Control is a COM object with a set of standard interfaces as defined by COM standard for a Control. If a COM object supports all the required interfaces as defined by Microsoft for a Control, then it is a Control.
|
|
|
|
|
I am trying to load this dll in my VC++/MFC class using COM. However, it generates error in the generated .tlh file. This is what i did. I import the dll in stdafx.h and insert the following on a button control.
HRESULT hresult;
CLSID clsid;
CoInitialize(NULL); //initialize COM library
hresult=CLSIDFromProgID(OLESTR("Techno.Servo"), &clsid); //retrieve CLSID of component
_Servo *t;
hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(_Servo),(LPVOID *) &t);
if(FAILED(hresult))
{
AfxMessageBox("Creation Failed");
return;
}
t->MOVE(); //call method
t->Release(); //call method
CoUninitialize(); //Unintialize the COM library
Can anyone please tell me where the error is?
|
|
|
|
|