|
I have situations where I want to provide access to a DCOM server over a large network, or perhaps even the Internet. I find that if I enable the guest account, this will work for many users. But, if the remote user has logged in to their computer or domain as, for example, user 'jsmith', and if the
DCOM server computer or domain happens to also have an account for user jsmith, then their passwords must match. This seems to be true whether the guest account is enabled or not. Indeed, if I create these duplicate accounts, then I don't need the guest account. This is just as well, since many clients balk at enabling the guest account, and it is particularly scary to do so on the Internet. But how can I handle a situation where there are two jsmith's out there (obviously on two different computers/domains) each with a different password?
|
|
|
|
|
Anyone who knows how to give a ActiveX control full permission to files on the client's computer??
Can I do this by signing the cab-file?? How do I do that??
|
|
|
|
|
If you look up in MFC's documentation on various OLE classes, e.g. COleVariant you are asked to look up in Win32 SDK OLE Programmer's Reference for more information. Where can I find this? Is it anything i can download?
One other thing, I am totally new to COM. Will it help me to have this reference, or is useless without a learner's book. It seems to be a very complex subject .
Regards, Haakon S.
|
|
|
|
|
Hi,
I want to create 2 ActiveX Ctrls,
which will be displayed in a browser( via using HTML page).
Now I need them to communicate with each other,
via events and/or calling each others' method.
How do I make the controls aware of each other at Runtime,
so that I can achieve the above.
Can someone provide some clarification here please.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
I'm looking for an explanation for why this syntax works, or what ATL macros or declarations is being referenced to make it work:
'SAFEARRAY(VARIANT)'
I've only been able to find 'SAFEARRAY' typedef'd as a struct and not a macro like I was expecting.
So as an experiment I put these two properties in an IDL file:
[propget] HRESULT Prop1([out, retval] SAFEARRAY(VARIANT) *pVal);
[propput] HRESULT Prop1([in] SAFEARRAY(VARIANT) newVal);
[propget] HRESULT Prop2([out, retval] SAFEARRAY *pVal);
[propput] HRESULT Prop2([in] SAFEARRAY newVal);
Then I referenced the type library from within a VB project and brought up the object browser to see how they were interpreted. After finding them and highlighting them, the information at the bottom of the screen looked like this:
<br />
Property Prop1 As Variant()<br />
Property Prop2 As tagSAFEARRAY<br />
HOW can this be???? how the heck does the SAFEARRAY(VARIANT) syntax work? is it spawning a constructor, or is it some hidden macro? is there a way to view the IDL file after pre-processing to see how this is expanded (again this assumes a macro i've not been able to find), or is IDL even pre-processed. I'm lost as to how the type information in the type library for these two parameters differs.
Can anybody shed some light? I'll make my project work regardless, but I feel incomplete without my having an understanding of what I'm doing.
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
Get yourself a copy of Essential IDL by Martin Gudgin.
Yes, IDL is preprocessed (in a similar way to C/C++), and if you have MIDL 6.0.0.x (platform SDK version) rather than the VC++ supplied version, then it supports /savePP to save the preprocessed version.
It's just a syntax thing, no constructor, since IDL is purely a description language. Although hints about the SAFEARRAY type are put in the type library, I don't believe they are checked or enforced by any marshalling.
Steve S
[This signature space available for rent]
|
|
|
|
|
Hello,
My app remains in memory for 2-3 seconds when I close it (as I can see in the process viewer). I guess that it's because some COM objects are unreleased but all seems in order in my app.
Is there a way to know what causes this hang?
Thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
In my program, have a EditBox and a WebBrowser2 control,I want to drop a select range's html source to the EditBox control,when I use WebBrowser2 control to navigate a Web page.
My original way is,when a event(mouse dorp) coming , I send a copy(Ctrl + C) event,
then paste the content in the clipboard,but I think is effect on the other program.
So I want other way for resolute this problem.
Very thanks.
|
|
|
|
|
Can anybody help me please? I had an error for 3 days and i don´t know where really is the problem.
I have created a dll, which has its interface declaration (with IID) and the class declaration (*.h + CLSID + interface inheritance) and the functions definitions (*.cpp). The registration of the dll was ok.
In another program, I want to create an instance to this dll, and threfore i call the functions of DirectX
CODE
________________________________________________
CoInitialize(0);
CoCreateInstance(CLSID_Something, NULL, CLSCTX_INPROC_SERVER, IID_ISomething, (void**)&m_pSomething );
-----------------------------------------------------------------------------
The compiler and linker give no error, but when runnig the application it breaks because the instance was not created (NULL pointer returned, E_NOINTERFACE).
|
|
|
|
|
What about naming that interface in your post ?
Back to real work : D-24.
|
|
|
|
|
Ok, here it goes
The next code is the declaration of the interface:
CODE
_____________________________________________________________________________
static const GUID IID_ISomething =
{ 0x5a9fc16e, 0x69b0, 0x4092,{0x9b, 0x17, 0x0e, 0xae, 0x91, 0x9c, 0x61, 0x2d}};
DECLARE_INTERFACE_(ISomething, IUnknown)
{
STDMETHOD (func1) (THIS_
unsigned char* Data, int width, int height
) PURE;
STDMETHOD (func2) (THIS_
int* MyFeature
) PURE;
STDMETHOD (func3) (THIS_
int Feature1, int Feature2, float *Distance
) PURE;
};
_____________________________________________________________________________
And the class is declared as follows:
CODE
_____________________________________________________________________________
static const GUID CLSID_Something =
{0x5b4f902f, 0x0d14, 0x44df, {0x99, 0x51, 0x1a, 0x18, 0x70, 0x4f, 0x3c, 0x21}};
class CSomething : public ISomething
{
public:
//IUnknown interface
HRESULT __stdcall QueryInterface(REFIID riid , void **ppObj);
ULONG __stdcall AddRef();
ULONG __stdcall Release();
//ISomething interface
STDMETHODIMP func1( unsigned char* Data, int width, int height);
STDMETHODIMP func2( int *MyFeature);
STDMETHODIMP func3( int Feature1, int Feature2, float *Distance);
};
|
|
|
|
|
This code looks pretty much ok, but there are many things to figure out :
- if you try dumpbin /exports , do you see 4 exported function names ?
- do you have an IDL file ?
- do you use ATL for the registration ? and regarding this, what is the implementation of DllRegisterServer() and DllGetClassObject() ?
I guess that, instead you start zipping the whole stuff and upload it somewhere, you could get a bit further by putting a breakpoint in DllRegisterServer() (I assume your component is a DLL, not a .exe). At least if this gets called when you do regsvr32, that's because things are about right.
Then, put a breakpoint in DllGetClassObject(), there you should see somehow a class factory create for you an instance of CSomething. If you are using ATL, you'll have to put a breakpoint in the plain ATL code.
Back to real work : D-24.
|
|
|
|
|
Yes, I have my exports, declared in exports.def and defined in exports.cpp (where I have my DllGetClassObject() which creates an instance to the Factory class).
Inside Createinstance() of the Factory, a new object of my dll is created. Later, it goes inside the QueryInterface() of me Object dll. The next interfaces are called: ISomething, IMarshall, IUnknown, and more.... y only have implemented the handling for IUnknown and ISomething, therefore, the rest of them are returned as E_NOINTERFACE. What should i do?
I am not using IDL file.
I have bebugged also the registration of the DLL and everything seems ok, the DllRegisterServer() seems to work.
|
|
|
|
|
Hello,
I am using IStream interface to read and write data objects into a structured storage file.
pOrderInfo->Write(&cust1, sizeof(cust1), NULL);
pOrderInfo->Read(&cust2,sizeof(cust2),NULL);
Can some one tell me what should I do if I want to update information in cust1 structure and save it back to file ?
Say, I want to change cust1.Name = "new name".
thanks,
|
|
|
|
|
I want a COM control held a FormView and CMDIChildFrame. And the control provides a interface, the container App(a MDI App) can use the interface gain the pointer to the CMDIChildFrame from the control. Then the container App can use the CMDIChildFrame as its own child frame.
|
|
|
|
|
Please, suggest me where I can find or purchase documentation or SDK for MS-Word 97 and 2000 DOC-file format. May be you can also suggest me where I can find or purchase any component, which can write data directly into DOC-file without using MS-Word OLE Automation Server functions, or which can directly convert MS-Word RTF-file into MS-Word DOC-file without using MS-Word OLE Automation Server functions.
|
|
|
|
|
I need to write an extensible app. My app uses services provided by one or more plug-ins written as COM components. Users can write a plug-in and then install it. That's going pretty well so far but it suddenly struck me that I'm not doing any real verification. In other words, if one of the user-written COM plug-ins wasn't a "genuine" one, how would my application know? Further, if I provided one or two COM objects that offered services to plug-ins and to the application I need to ensure plug-ins haven't got access to certain methods/objects that the application has access to.
It seems that COM offers excellent security for distributed object requests but local security only consists of ensuring the user has access to a particular COM object.
To summarise then:
1. How do I verify a COM component's source? In other words, how do I verify that a COM component which has been "discovered" by my application on initialisation, is geuine?
2. How do I allow one COM object to access another COM object's services, and denying it other services?
Thanks for reading and any input gratefully accepted
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
|
|
|
|
|
1. A COM interface is a contract between a client and a server. You have to trust it somehow. If you want to make sure people use badly the plugin architecture you provide them, force them to sign (public keys, etc.). You have docs on MSDN for that.
2. Use DCOMCNFG.EXE to create interactively the proper RunAs registry keys so certain COM services are run with degraded priviledges.
How low can you go ? (MS rant)
|
|
|
|
|
I am newbie to COM, What i want to Do.?
in Msn Messenger : renji12renji@hotmail.com
|
|
|
|
|
Renjith r wrote:
What i want to Do.?
Wow - there's a question. You should buy a good book, I recommend 'creating lightweight components with ATL' by Jonothan Bates. ATL is a template library, it's the ONLY way to be creating COM components.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
it's the ONLY way to be creating COM components.
Ain't that a tease to hell!
How low can you go ? (MS rant)
|
|
|
|
|
*grin* A general question demands a vague answer.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
AnyWay Thanks For Ur Kindly info..
Thank you
in Msn Messenger : renji12renji@hotmail.com
|
|
|
|
|
Hello All,
In my project, I am using IStorage::CreateStream(). What I am doing is creating storage, and adding a file into the stream. For that I am using CreateStream, but the problem is, if the file name is large my program is crashing. I read MSDN, that CreateStream can't handle large filename (more than 31 characters.) Its giving me an error invalid pwcsName.Is there anyway to handle this problem???
Or is there any alternative which can solve this problem. Please, help.
Thanks,
|
|
|
|
|
I answered this in the C++ section: here
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|