|
d00_ape wrote:
Is the "Oleview.exe" about the same program as "Dependency Walker"?
Nope. It's basically a browser for all COM components in the system. It allows you to inspect them, their type libraries (if any) and instantiate them. It's a very handy program.
d00_ape wrote:
Tackar - Jörgen
Varsågod!
--
Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr.
Welle: Erdball - F104-G Starfighter
|
|
|
|
|
Hi .
I faced with very wired thing.
I made my component in VC7 and when compiling one all flow in right way(component compiled and linked with out error),then invoked regsvr32 and it rised error : Specific module not found and show exact path on my output .dll
file, at this time this file exist in mentioned path.
Ok this trouble num.1
Indeed i register component from command string and all fine,one registered without trouble.
Now i make test in console application , and try to create this component by CoCreateInstance function(pass as first parameter well CLSID of this component )but one returned error:
Class not registered.
I launch OLE\COM viewver and see this component exist there
and had good TypeLib information,then i launch regedit and search there my classId, but the are nothing found .
How this possible??? I supposed OLE\COM viewver pick up information from register...
HELP me to clarify this situation.
THANK
|
|
|
|
|
I can deal with those tables with just 1 BLOB field. But I failed when dealing with those tables with more than 1 BLOB fields. Error occurs when the IRowset::GetData function is called.
After searching the keyword, DBPROP_MULTIPLESTORAGEOBJECTS, in MSDN, I found some articles about it. But I still cannot resolve the problem under the reference of those articles.
I tried to find an example that opens table with multiple storage objects, but I failed again.
|
|
|
|
|
Hi,
How to create a User Define Collection?
Mark
|
|
|
|
|
|
HI ,
I need to implement custom print in mshtml i.e iam using my print dialog . I need to know the page range and margins setting. The Exec command takes OLECMDID_PRINT takes these setting in its third parameter.Can anyone tell me how to get it?I need to implement removeFormatting also, i used Olecmdid_removeformat does't work for some element such as span.
Thanx in advance
|
|
|
|
|
Hi,
Has anyone developed a custom metadata editor using C#.net or vb.net. if yes, i have a question.
I am trying to develop a custom metadata editor using C#.net. i am using ArcGis 8.3 and Visual studio .net 2003.
when i am trying to execute my custom metadata editor in ArcCatalog it says "Object reference not set to an instance of an object". i don't know where i am going wrong..
I appreciate your help in this regard..
example is given on http://arcobjectsonline.esri.com
Thanks,
abhi
|
|
|
|
|
What does my code do?
<br />
#import "MyDll.dll"<br />
….<br />
CoInitialize(NULL);<br />
<br />
if(SUCCEEDED(m_IPtr.CreateInstance("MyDll.Stuff")) )
{<br />
}<br />
else<br />
{<br />
}<br />
...and justice for all
APe
|
|
|
|
|
I don't think its quite that simple.
You are venturing into the realms of COM (of which I am still a student), and not just any common DLL.
Unlike LoadLibrary() that loads a regular dll into your address space, and therefore enabling you to execute its functions; 'instantiating' a component interface, which is what your sample does, does not involve the same concept.
at least thats what I think what you are asking!
I Dream of Absolute Zero
|
|
|
|
|
Thanks!
My next question was about the LoadLibrary(...) func.
I guess thats the one I should use.
Again - Thanks
...and justice for all
APe
|
|
|
|
|
Hi,
I'm having a problem when iterating through the contacts in Outlook. I can create contacts ok and access all the properties of them, but when I try to iterate through them I get an exception. Can anyone see what I'm doing wrong
_NameSpacePtr pNamespace;
_ItemsPtr pItems;
_FoldersPtr pFolders;
MAPIFolderPtr pFolder;
_ContactItemPtr pContact;
CComVariant vIndex;
m_spApp->GetNamespace(_bstr_t("MAPI"),&pNamespace);
pNamespace->GetDefaultFolder(olFolderContacts,&pFolder);
pFolder->get_Items(&pItems);
Outlook::OlObjectClass Class;
CComBSTR EntryId;
pItems->get_Class(&Class);
hr=pItems->GetFirst((IDispatch**)&pContact);
while ((hr==S_OK) && (pContact!=NULL))
{
pContact->get_Class(&Class);
if (Class==olContact)
{
pContact->get_EntryID(&EntryId);
hr=pItems->GetNext((IDispatch**)&pContact);
}
}
Any help you can offer would be greatly appreciated.;P
|
|
|
|
|
Hi and thank you for chyecking my post.
I have added a new method to the interface of an existing COM+ component. The component (dll) runs as a library (runs in the creator's process). The trouble is that the the new method is not being picked up and added to the interface.
Here is what I do :-
- I build the dll
- stop the IIS Out of Process on the server
- copy over the dll and fire up an ASP page
- I then check Component Services to see if the new method has been added to the interface. It has NOT.
I know I am missing something but what is it? I'm relatively new to COM.
Thanks for any help.
Mike
|
|
|
|
|
You can using TypeLib Viewer to make sure that the method is added to the interface.If it's does exist,may be you should create a new com+ server using the new dll.I think the interface you seen in Component Services is the old one.
lll
|
|
|
|
|
Dir sir
+. I'm using FAXCOMLib and C#.net for developing an application.
+. In my Application I have send a fax. But when I click button SendFax
I recevice an Error: "The handle is invalid"
What should I do ?
|
|
|
|
|
According to MSDN: Only EXE object applications call CoRegisterClassObject. Object handlers or DLL object applications do not call this function &emdash; instead, they must implement and export the DllGetClassObject function.
But why CLSCTX_INPROC_SERVER there??? It says it is for DLL, but CoRegisterClassObject says for EXE??
Thanks a lot for replying
|
|
|
|
|
CoRegisterClassObject "Registers an EXE class object with OLE so other applications can connect to it. EXE object applications should call CoRegisterClassObject on startup. It can also be used to register internal objects for use by the same EXE or other code (such as DLLs) that the EXE uses."
CLSCTX_INPROC_SERVER could be used to register an object for internal use by an executable.
Ian Mariano - Bliki | Blog
"We are all wave equations in the information matrix of the universe" - me
|
|
|
|
|
thanks, ian.
I am a new COM guy, but I think I can not find the answer anywhere in
1. Inside COM, MS Press
2. Inside DCOM, MS Press
3. ATL Internal, Addison-Wesley
4. Inside COM+, MS Press
5. Inside ATL, MS Press
6. COM+ Programming: A Practical Guide Using Visual C++ and ATL, Pretice
May I ask where I can find an example of this kind of usage? Thanks again. COM Guru.
|
|
|
|
|
You'd basically create such an object the same way you do any normal COM object, using CoCreateInstance. There's a small simple ATL COM example on CodeGuru. Google's also a good place to start.
Ian Mariano - Bliki | Blog
"We are all wave equations in the information matrix of the universe" - me
|
|
|
|
|
Hello,
The original program(OLE Automation server) was impemented on Borland Delphi. But the program don't register itself in ROT during start-up(ie program don't call RegisterActiveObject()).
- How can I connect to the running instance of the program?
I can get PID from processes list. Can I some how use that for inquiering the interface pointer(IDispatch)?
Thanks for any suggestions.
|
|
|
|
|
Dear sir !
+. How can I initialize tapiFax
+. Tapi3.x which is support send/recevice Fax ?
+. Please help me
|
|
|
|
|
It's possible to use LoadLibrary() and GetProcAddress("DllGetClassObject") on a DLL in order to obtain a ClassFactory. You can then use the ClassFactory to create a COM object.
Is there is an equivalent technique that can be used for an EXE?
That is, can I create a COM object from a nominated instance of an EXE?
Thanks in advance.
|
|
|
|
|
Hi,
I have a function that passes the following arguments:
void SignOn(BSTR* Name, BSTR* Password, BOOL* UseProxy, BSTR*
ProxyServer, short* ProxyPort);.
I declared the following variables which I pass to the function
BSTR Name = ::SysAllocString(L"coinpig");
BSTR Password = ::SysAllocString(L"aug2203");
BOOL useproxy = 0;
BSTR proxyServer = ::SysAllocString(L"0");
short ProxyPort = 0;
short * strPortptr = &ProxyPort;
When I use the active-x control test container and specify that all
values are BSTR the function works properly. When I call the function
with the variables I declared, the program exits with code 3. I am
new to MFC, and greatly appreciate any help.
Thank you,
Tom
|
|
|
|
|
How are you calling the SignOn function in your code?
To call SignOn with the variables you have created and the function prototype you have given:
<code>
SignOn(&Name, &Password, &useProxy, &proxyServer, strPortptr);
Or you could prototype your function like:
<code>
void SignOn(BSTR Name, BSTR Password, BOOL UseProxy, BSTR ProxyServer, short ProxyPort);
and then call the function:
<code>
SignOn(Name, Password, UseProxy, ProxyServer, ProxyPort)
The only difference between the two: the former uses pointers as parameters, whereas the latter does not.
I prefer the second approach unless I need to logically change the value of more than one variable in which case I would change my parameters to use pointers. Functions can only have one physical return value.
Hope this helps!
|
|
|
|
|
HI..i am a newbie in COM tech.
i have a class coded in VC++ which i need to create into a COM for use in my vb.net application..
i have use a ATL COM Appwizard to create a com. add a new atl object already.
i keep getting this error.
i need to pass in a parameter to the constructor of the class i created..seems like i cannot instaniate my object.
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : error C2259: 'CComObject<class ctranscodeengine="">' : cannot instantiate abstract class due to following members:
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator<class atl::ccomobject<class="" ctranscodeengine=""> >::CreateInstance(void *,const struct _G UID &,void ** )'
PLS help...
thks in advance...
iceman
|
|
|
|
|
Hi,
I’m developing an ActiveX-control in VS C++ 6.0 (WinXP): works fine.
For deployment, I’m using VS.NET for making the Cab-file (New project: Cab
Project). Adds ocx and builds Cab: works fine.
Problem: The .ocx is depending on 2 other dlls, as it is now they are downloaded and registered manually: this works some times, some times it is "Dll Hell".... "Dll hell" occurs when updating ocx and dlls.... is there any way to force registration and so on? My belive is that it will work fine if I just adds the dll to the Cab File-project, could that be right? If so, how do I do it in VS.NET (I know how to add the files, but it’s not working when adding the depending dlls)?
I’m also a bit confused of the making of the Cab File, with VS.NET (Cab Project, OSD-file) it’s easy, but I don’t know what I’m doing... old tech, with INF-file, it was harder, but more open I guess?
Which is the best solution in my case?
...and justice for all
APe
|
|
|
|