|
To spare yourself of lots of bulk code, do a QueryInterace for IPicture instead. It's a vtable-based interface.
Good music: In my rosary[^]
|
|
|
|
|
I am new to DCOM. I have an application that continually fails to start. Tech support has advised me to go into properties of the object in DCOM config to set launch permissions. When I right click on the object I don't have propertites to go to, on view. Tech support for the application can't even tell me how why I don't have properties available. I have tried as a user in the Administrators group, I have tried with the built in administrator account, and still nothing. Can someone please help me?
|
|
|
|
|
Hello everybody, I am a fresh in COM.
I want to create a COM in singleton mode. So there only
one instance in system. Multi clients share the object.
For example, if one client change a member of the COM
object coclass, other clients are affected.
How to implement? Is this possible?
thanks
|
|
|
|
|
if the clients are in same thread department, then it is possible, just need this macro:DECLARE_CLASSFACTORY_SINGLETON
|
|
|
|
|
Thanks
if client is in different process, is it impossible?
If you proxy & stub method, is it possible?
|
|
|
|
|
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
|
|
|
|
|