|
My application fails with "This application has failed to start because the application configuration is incorrect. ..." on other computers.
I know that Microsoft Visual C++ 2008 Redistributable Package or Creating setup.exe helps, but I need another solution.
I want my program to work without installers and packages. What should I change in project properties?
PS:I am working in Visual Studio 2008.
|
|
|
|
|
If you are working with COM you should check if the your custom COM Components dlls are being registered properly.
You could make two scripts to do this, for exmple
Reg.BAT
regsvr32 ProcessLibrary.dll
regsvr32 ProcessLibraryPS.dll
UnReg.Bat
regsvr32 /u ProcessLibrary.dll
regsvr32 /u ProcessLibraryPS.dll
JO
|
|
|
|
|
I use "Standard windows libraries" with "common language runtime support"
As I understand MSDN, I should register msvcm90.dll, msvcp90.dll, msvcr90.dll on computer to run my application. Am I right?
|
|
|
|
|
No,
The dlls you should register in order to use them are the ones of you COM Components (i assumed you were developing COM somponent for the Forum name ).
You could Also check for missing dlls in you installation directory with the dependency walker, this little program checks yor .exe for missing dependencies so you could copy to the instalation dir the files missing (ie: msvcm90.dll, msvcp90.dll, msvcr90.dll )
You could download dependencywalker from:
http://www.dependencywalker.com
JO
|
|
|
|
|
After using dependencywalker I understood that my program requires msvcm90.dll, msvcp90.dll, msvcr90.dll.
I copied them into directory with my .exe file, but it didn't helps. Maybe I should copy them to some system folder&
|
|
|
|
|
|
Just for clarification, this isn't a COM error. It is caused by an Fancy MS feature called Windows Shared Side by side Assemblies (or any other weird name, so apologize). See http://msdn.microsoft.com/en-us/library/aa375996(VS.85).aspx[^]
Never wondered about the C:\WINDOWS\WinSxS directory?
The worst thing you can do is copying the 9.0 dlls to your exe path, or simply registering them in your system directories since this can cause third party applications to fail!!!
The MS way would be redistributing the dlls with their own created merge modules located somewhere in the Studio folder. (I'm too lazy to look up the correct location, if you can't find them PM me ).
So long,
Stefan
|
|
|
|
|
C:\Program Files\Common Files\Merge Modules
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
Hello Friends,
I am using Windows Vista and I am builing an c++ ATL DLL in Visual C++ 6.0, which is an addin DLL for Windows Mail. (Outlook Express)
When I run my Windows Mail, Vista's DEP (Data Execution Prevention) feature blocks it, and prompts that it blocked for security purpose as some other program tried to use windows mail data.
But I have to hook into Windows Mail as have to put an addin to customize its GUI.
I tried to turn DEP off for Windows Mail, but it didnt allow me (even in Full Admin Account).
Also I turned DEP off for my exe (which loads my addin DLL, which further hooks into Windows Mail), but despite that Windows Mail is blocked.
Also, when I build the project in Visual Studio 2005, it runs very well. (And I have not made any change in the project settings or code)
It seems, VC 6 uses older compilers and VS 2005 uses latest ones so are compatible with Vista!
But I have to use VC 6 only as it's my project's requirement!
Please Help!
Thanks a lot !!
dolly,
N,IN
|
|
|
|
|
The ATL in VC++ 7.1 and earlier makes use of thunk code that requires executing code from a data block. The DEP feature prevents that. Here is a KB article I wrote on the subject:
Applications Using Older ATL Components May Experience Conflicts With DEP:
http://support.microsoft.com/kb/948468
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
I am trying to export function from raw COM DLL and for the purpose i am using .def file.
I am using LoadLibrary to load the DLL in the client process area.
HINSTANCE hComponent = ::LoadLibrary("Cmpnt1.dll") ;
if (hComponent == NULL)
{
//Error: Load library fail.
return NULL ;
}
The Dll is loading properly.
After that i am calling GetProcAddress to get the address from the DLL.
CREATEFUNCPTR CreateInstance;
CreateInstance = (CREATEFUNCPTR)::GetProcAddress(hComponent,"CreateInstance") ;
if (CreateInstance == NULL)
{
// Print error
return NULL ;
}
return CreateInstance() ;
This call fails with return code 127.which means the function was not found.
any suggestion
~sandy
Thanks in Advance.
|
|
|
|
|
There seems to be some problem in the way you export your functions from the component. the compiler mangles the name and this is not getting resolved.
Check this out:
1> Do you export the function(s) properly
2> extern "C" is in use
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes, i am using extern "C" and for exporting function i am using .def file and as per my knowledge i am doing it properly. otherwise i think loadLibrary would have also failed.
|
|
|
|
|
Just create a new ATL DLL project. It will put a few export functions there. Search for one of those functions to see how your code is different.
I've just extended my COM DLL using such by-example technique, it worked fine.
|
|
|
|
|
Hello everybody,
I hope someone can help me...
My .net code goes like this...
public class ProxyFacade : BaseProxyFacade
{
ProxyConfiguration _configuration = new ProxyConfiguration();
public ProxyFacade(Uri Uri)
{
_configuration.Url = Uri;
}
public Student IncreaseAge(Student StudObj)
{
StudentServiceClient client;
base.ProxyConfiguration = _configuration;
base.PreProceedHandler();
client = new StudentServiceClient(base.BaseProxy, base.BaseProxy.EndPointAddress);
client.Open();
return client.IncreaseAge(StudObj);
}
}
My Issue: I have registered this dll as COM component.
When I try to instantiate this ProxyFacade from VB6, I am not able to give the object reference with New Keyword?
Do I have to set anything in the .net side? What is the correct way to instantiate this .net object registered as COM?
My VB6 code:
Private Sub cmd_CallCOM_Click()
Dim objStud As New ProxyLibrary.Student
Dim a As Integer
objStud.Age = 11
objStud.Name = "Johnie"
objStud.IsOutStanding = False
Dim objFacade As ProxyLibrary.StudentServiceClient
Dim b As ProxyFacade
'a = objFacade.IncreaseAge()
'Set objFacade = GetObject("http://localhost:3507/StudentException/Student%20Service.svc/rest")
lbl_Age.Caption = objFacade.IncreaseAge(objStud).Age
End Sub
When i tried with GetObject, again error...
I think i am taking a wrong way to instantiate this object which has parameterized constructor...
Any help plssssssssss
Tnx in advance,
Saran
|
|
|
|
|
For a while my code has been running fine on a server, but for the last week it's been failing consistently. I started debugging and found out that it's failing when I call CoCreateInstance. The error code returned is:
0x8007000E
When I looked it up, the corresponding message is:
"Not enough storage is available to complete this operation."
What does this really mean? I looked at the server and there seems to be plenty of free memory (RAM) for applications. I'm fairly new to COM, but from what I understand, this method is called to create an object using a Class ID or Program ID (from MSDN), I've tried this app on another server and it seems to work. I'm fairly new to COM, so any information you can share would be helpful.
|
|
|
|
|
Hmm, never came back to this, there were so many things running on this particular box, it was resource related.
|
|
|
|
|
Hi All,
I've been planning for some time to do a project with COM for the community of software developers.
The project, in essense, is to generalize access to all information on the PC in a simple way, something like what WMI does, only better (read simpler).
I wonder, however, if i'm not too behind doing this (a few years), and whether a COM project, if it is good, can still be applaused by .NET developers?
Any opinions here are welcome!
Cheers!
|
|
|
|
|
I know this is a bit early to wonder if this post would ever be answered, but i published information about the idea here: http://www.codeproject.com/script/Forums/View.aspx?fid=1641[^]
It's titled Researching Opinions: Professional System Library
I think this might be of interest to all COM developers.
Cheers!
|
|
|
|
|
you know i have heard similar things about people flaming com
you know what it works its easy and it gets the job done so it is fine ill applaud anything created
that is the whole point of the framework so we can build on top of stuff made and the object oriented paradigm
we dont need to know certain things except what needs to be exposed to our classes and functions inheritance polymorphism
etc
so com makes it easy by dragging a control and building off of it
use anything that works bro
|
|
|
|
|
Thank you for the encouragement, I appreciate it very much. I also came to the conclusion that there's no way to evaluate any idea until you show results, so I started on this project two weeks ago. I got a website for it: www.prosyslib.com, net, org. So, I’m seriously planning to be back here with some first results soon, something a lot more tangible than the theory (even changed my signature )
Cheer'o!
Professional System Library on www.prosyslib.com, simplifying life for software developers.
|
|
|
|
|
Hello Friends,
I have an <b>ATL project in Visual Studio 2005, but now I want it in Visual C++6.0.</b>
I have used one utility available on Code Project only i.e.
<b>prjconverter.exe</b>
it converted .sln to .dsw BUT on building the project,
I am having many error, mainly
<b>"C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2065: '_Module' : undeclared identifier"</b>
Because even in converted project,
class Coeapi_sampleModule : public <b>CAtlDllModuleT</b>< Coeapi_sampleModule >
{
public :
DECLARE_LIBID(LIBID_oeapi_sampleLib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_OEAPI_SAMPLE, "{2FB8F87B-D079-497D-8948-F2F060162392}")
};
<b>Coeapi_sampleModule _AtlModule</b>;
<b>BUT</b>
what I want (generated by compiler if we build in vc 6) is
<b>CComModule _Module;</b>
and i read that CComModule is obsolete now, but I have to use it anyway because <b>I have to code & build the project in Visual C++ 6.0</b> only not in Visual Studio 2005.
Please Help.
Thanks well in Advance!
dolly,
N,IN
|
|
|
|
|
Hi,
I am in need of a MTA (Multithreaded) COM component for one of my application.
I would like to know if VC# can be used to develop the MTA COM component instead of VC++? If possible, how? or any info regarding it will be helpful.
Thanks in advance.
|
|
|
|
|
Hi,
When you program COM components in C++ you genereally use ATL, wich helps you a lot to deal with the COM gore details.
Since C# is a managed Language that runs over the .NET framework it was not designed to support COM developing which is an older unmanaged technology
If you want to use COM components from you C# App I strongly recommend you to program them in C++ and loading them into your C# project.
But you should first evaluate if its strongly necessary to use COM instead of a .NET component programmed in C#
JO
|
|
|
|
|
I want to make a function in COM dll which receive one character string and returns one character string. Since scripting languages dont use char* please suggest how to make this function in COM and how to use it. Please give any sample.
Manoj Kumar Chauhan
|
|
|
|