|
You need to use #import "yourdll.dll" statement in your code. Doing so, .tlh , and .tli will be generated in debug/release folder. You can use .tlh as header.
|
|
|
|
|
Thanx prasad
I have used #import "mydll.dll" in my code but it giving error as
"fatal error C1083: Cannot open type library file: 'mydll.dll': Error loading type library/DLL"
Any alternative do you want to suggest,i think type library is not embeded in this dll...
Manish
|
|
|
|
|
You need to give, full path, mentioning "\\".
|
|
|
|
|
I ve tried all combinations with #import.
If i delete this dll then it shows no such file menas it currectly points to this dll.
Any sugestions or alternative??
Manish
|
|
|
|
|
Is type library for same dll is not there?
|
|
|
|
|
no!!
i was having only dll with me,how can i use that dll then??
Manish
|
|
|
|
|
Hello,
In my VC++.NET 2003 multithreaded application I need to use some COM server. I can call it from both threads using RCW, but after some period of time I have this error message: “COM object that has been separated from the underlying RCW can not be used” from the main thread. I don’t use Marshal::Release(…) explicitly, it means garbage collector decided to free some memory and destroyed my object. I already tried to increase reference count using Marshal::AddRef(…) and I tried to create additional global instance of this object. Both approaches didn’t work. How to tell Framework not to destroy this object? Please help!
Regards,
Leonid
|
|
|
|
|
Hi
I am using COM object in Web Application. There is a problem to solve authentication & authorization issue for Server site. At the time of using the COM object it shows the error " ACCESS DENIED ". If I am writing <identity impersonate="true"> in web.config, it is OK but the AJAX file is not accessible for that reason.
if I am using iisreset in Run command, then the whole application is OK, but it is not possible to reset iis again and again in production server. Have you any idea for this?
For more clarification, suppose there is a link in a Web page interface. After click the link, one Word document will open. How we solve authentication/authorization issue in iis without affecting to other files like AJAX.
I am using ASP.NET with C#. I am not using MTS.
any idea, please write.
regards
|
|
|
|
|
Hi
I am using static binding i.e the use of dll of MS OUTLOOK 2003 in my Windows application to extract FROM,TO,CC,BCC,MESSAGE email addresses and their names etc. and store it into an MS ACCESS database. The module is working fine in my machine and also in client machines, but some of the clients are complaining that they are getting the error at the time of running the module. They are also using MS Office Outlook 2003. They are getting the error when try to run the application.
The error is like this:
System.IO.FileNotFoundException: The specified module could not be found.
I think sometimes CLR fails to load unmanaged dll of OUTLOOK. I have tried by using most of things but till now there is no success. All the dlls are present in applications root folder.
Is there any idea?
regards
|
|
|
|
|
Hi All,
I need help about how to use the rational rose dll in my application ,it's A COM reference , some of its functions take parameters of type interface that is build in rational rose dll itself , and so i need to make an instance or pointer of this interface to use it in these functions.
Thanx soo much
samar waheed
|
|
|
|
|
Hello,
I write an ActiveX control that automates MS Word. Specifically, the control embeds MS Word into a PowerPoint presentation. The problem that I faced is a thin border around the control when the presentation is run. I need to get rid of it so that there are no any borders around the control. I have tried to resize the control by calling the main frame's MoveWindow hoping the border will move out of the visible area, but the border still persists. Apparently, the border has nothing to do with the main frame. So the question is - how to get rid of this border?
Thanks in advance.
Dennis.
|
|
|
|
|
Would anyone be kind enough to explain the difference between a COM dll and a Windows dll with some exported functions? How do these dlls work?
Lets say the COM dll is Cdll and the normal dll is Ndll . Application A is accessing Ndll . Would Application B be able to access Ndll when Application A is still using it? If yes, does App A and App B load two separate instances of Ndll into their respective memory space? What is the scenario if Cdll is used instead of Ndll ?
I am really puzzled.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
Hakuna-Matada wrote: difference between a COM dll and a Windows dll
Well, I'm not 100% shure, but i think the basic difference is, that a windows dll just exports functions. A COM-dll exports a fixed set of function (like DllRegisterServer and stuff like that) wich provide the Client with access to some COM-Components. In this sense, a COM-dll is a special case of a Windows dll.
Generally, the very reason for inventing dll (Dynamic Link Libraries) was to make them shareable among multiple programms to save memory (that is but one aspect).
This is just a very simplifing answer, but i am not that deep in that matter myself.
As for your last question, for reasons i explained above, you cannot simply interchange the two.
|
|
|
|
|
A DLL is a DLL - it's loaded into the process address space upon request. Each process has its own address space and therefore its own copy of the writable parts of the DLL (statically/globally allocated data); the pages containing code and read-only data are shared between processes, as long as the DLL can load at its preferred base address. (If not, the code has to be relocated, address references having to be rewritten to match the actual address the code was loaded at, and this means making a copy of every memory page written to.)
There isn't really such a thing as a 'COM DLL'. A DLL that is registered as a COM in-process server must export the functions DllGetClassObject and DllCanUnloadNow . The latter isn't strictly required but failing to implement it means that COM can't unload the DLL if the application calls CoFreeUnusedLibraries . COM calls DllGetClassObject to get a class factory object for a COM class, which is used to create the actual objects. If DllGetClassObject isn't present, COM will simply fail to create the object.
|
|
|
|
|
Hi all,
how can i pass command line arguments to WinMain from IDE itself,instead of running the application from Command Prompt and passing Arguments.I'am using Vc++.7.0 in VS2005
mpk1979
|
|
|
|
|
Look into your Projects properties. There should be something like "Configurationpropertier/Debugging".
There should be a Field called "Command-agruments". At least i have it.
Hope that helps.
|
|
|
|
|
Hello out there,
I have a little question, hope somebody can help.
So let's start:
I have a .dll that's normally used as a shell extension. It adds a fuctionality to windows explorers context menu. (a dialog pops up and tell's something about the internal file version).
Now I want to write an executable that exactly does the same by using the dll. starts up the dialog. the argv[1] should be used to specify the file which is as an extension the clicked one.
Normally a dll. exports a function to call with LoadLibrary and getProcAdress.
Thats the Exported Functions of the dll:
DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer
Which one to call?
How the Shell calls the DialogBox?
Is there a regestry key, where the 'call' is specified?
Is it possible to call the shell extension dialog from the .exe?
ThX
drax
-- modified at 7:36 Thursday 28th September, 2006
|
|
|
|
|
Hi All,
I wrote some application that use COM.
In some place i need to close the COM object - but the main application that have the pointer to to com object still hold it.
I using "smart pointer" that release the com object in case no one have the com object - my problem is .... how can i force the com object to set the counter of the object that point to current object to be 0 ?
[ When i call release in com object i "tell" the counter to do count-- . my question is how can i force this counter to do count-- without call release ( in the com object) ]
Thanks for any help.
|
|
|
|
|
Hello Yanshof,
>> how can i force the com object to set the counter of the object that point to current object to be 0 ?
Doing so violates the basic principles of COM - that is, to ensure objects remain alive as long as a client holds a reference to it.
The only concept that is vaguely similar to what you want to do is when a COM EXE server, running as a visible application, is terminated by the user. In such a situation, prior to shutting down, the EXE server calls the CoDisconnectObject() API to release external connections to all its running objects. Each object will then take steps to notify its proxy that it is about to shut down.
The outcome of such an arrangement is to enable a proxy to respond to all subsequent calls from its client by returning RPC_E_DISCONNECTED or CO_E_OBJECTNOTCONNECTED rather than attempting to forward the calls on to the original object. When the client receives such a return value, it must destroy the proxy.
My suggestion to you is that : if you need to close (I guess you mean destroy) the COM object at some point in its usage, you should arrange for an event to be fired to your client so that it can be made ready for such a situation.
Best Regards,
Bio.
|
|
|
|
|
Calling StartServiceCtrlDispatcher with paramaters Servicename and Pointer to serviceMain Function is getting failed, can any one tell me why it is happening
mpk1979
|
|
|
|
|
What is the error code?
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
The Error Code which it returns is 1073 i.e service alredy running...but no service is running with that name
|
|
|
|
|
In StartServiceCtrlDispatcher documentation, MSDN says -
The process has already called StartServiceCtrlDispatcher. Each process can call StartServiceCtrlDispatcher only one time.
Are you doing anything like this?
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
How to create a custom Calendar control in asp.net web application??
please send me codes, methods or articles, creating calendar components creating calendar asemblies that can solve this problem... please..
|
|
|
|
|
I want to integrate outlook in an existing CRM. I think I have to make a outlook Addin for that.
I want to achieve certain things with it.
a. whenever some person emails there should be an automatic unique referece number generated for that email (a support ticket) and should be automtically sent to the sender.
b. audit trail of outlook messages
c. reporting
I am at loss to understand that how can I do these things.
An idea is to develop a web service and add in for outlook when executed should parse through all of the emails and send unique IDs to the senders or a webservice running in the background should do it automtically each time the user sends the email. once the emails are there then the addin should somehow expose the CRM database to the outlook client and the emails with associated attributes should be stored in a table at CRM... am I right???? and once its in table then reporting is not a big problem
am I on the right track
any thoughts on this,, I have this university project which I have to do ,, please help me
thanks
drequinox
|
|
|
|