|
prasad_som, A thousand thanks to you!
You just hit it, Now it's solved by killing the redundant comma.
I had checked the macro difinition I changed for so many times, but I just omitted the comma.
|
|
|
|
|
my pleasure
|
|
|
|
|
We have added the stackwalker.cpp program to our application to generate callstack report.
This is working fine in the development environment and the stacktrace is getting created.
But when we copy the executable to a separate windows system where there is no development environment like visual studio installed, the stacktrace is not getting created. Is this error
due to some missing dll files in the isolated system where we dont have visual studio installed
or do we have to make some changes in the way we are compiling and building the application.
Any suggestions would be of immense help.
|
|
|
|
|
I have searching for hours now trying to figure this one out. I have a .NET dll, not my own, which I wish to import into my project. From what I have read, and I may be wrong, I need to import it as a COM object. So I have tried
#import "net.dll" which results in:
fatal error C1083: Cannot open type library file: 'net.dll': Error loading type library/DLL.
This leads me to believe that the dll has no type library. When I have included my own VB dlls using the same method, I have no problems, the .tli and .tlb files are generated.
Is there another way to do this?
|
|
|
|
|
You haven't yet created the Type library for the .NET DLL. To create a type library, you need to make use of the regasm.exe tool.
regasm.exe net.dll Also make sure you have set the [ComVisible(true)] attribute
|
|
|
|
|
You can't do .net programming with VC6.
The best you can do is make the DLL have a CCW (COM callable wrapper) and then VC6 will see it as just another COM server.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Michael Dunn wrote: You can't do .net programming with VC6.
does that mean I can't code VB in VC either :p
The dll I am trying to use is from a sourceforge project which has been coded in C#. I do not have the means to compile from source therefore I have to download the precompiled version. So I suppose my question is, to make this work in my project, would I have to change anything within the .net dll?
|
|
|
|
|
Hi,
I'm trying to convert a C application written for Watcom's C/C++ compiler to Visual C/C++ and I'm getting a compile error on the file that contains some of the prototypes, yet I do not understand what went wrong and how it's different.
Here's the line from the prototype file:
LONG EXPENTRY fnwpMainWindow(<br />
HWND hwnd, UINT msg, WPARAM mp1, LPARAM mp2 );
EXPENTRY is defined as an _export APIENTRY, APIENTRY is defined as a WINAPI and WINAPI is defined as __stdcall.
The error I'm receiving is error C2143: syntax error : missing '{' before '__stdcall'
Any idea's why this is happening?
Thank you,
Glenn
|
|
|
|
|
gmhanna wrote: The error I'm receiving is error C2143: syntax error : missing '{' before '__stdcall'
So what is above the fnwpMainWindow() prototype?
What if you changed it to:
long _export __stdcall fnwpMainWindow(HWND hwnd, UINT msg, WPARAM mp1, LPARAM mp2 );
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi David,
Yes, fnwpMainWindow is the prototype. I changed it to what you have and I receive the same error.
Converting this does not seem to be a simple task...
Glenn
|
|
|
|
|
gmhanna wrote: Yes, fnwpMainWindow is the prototype.
I know that. I asked what was above it? The error said that a '{' was missing before __stdcall . So look at the code prior to __stdcall to see if there is a missing '{'.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi David,
After some experimentation I determined it has something to do with the _export, not exactly sure what but from what I'm reading I should be doing something like this:
long __declspec(dllexport) __stdcall Fred( );
Is this the same thing as:
long _export __stdcall SomeName( ); ?? From what I read, _export is really for 16bit and __declspec is for 32bit.
Your thoughts?
Glenn
|
|
|
|
|
gmhanna wrote: From what I read, _export is really for 16bit and __declspec is for 32bit.
You are correct?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
i've created some Cpp and h files in the console application
i want to use them in the MFC ..
but i have to include them in some dialog's cpp files ...
it shows me this error
<br />
...frmmodsupp.cpp(7) : fatal error C1083: Cannot open include file: 'CMot.h': No such file or directory
|
|
|
|
|
It looks like you do not have CMot.h is the project directory or in the search path.
|
|
|
|
|
I guess you forgot to use #include "Cmot.h" in your CPP file.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
Hello,
This is my first post here and I hope someone can help me.
I'm new to C++ and really know very little, however I am a fast learner.
Here's what I'm trying to do.
Write an app. that will copy 2 files and rename them.
Then the the app will start an exe.(the exe cannot be run in dos mode!)
Then the app will start a timer that will run the exe for 30 to 60 minutes.]
Then the app will shut down the exe.
I do not have any code started for this.
I trully do not know where to start.
I do have visual C++ 6.0.
Any and all help will be greatly appreciated!
Thanks!
|
|
|
|
|
try to look first at the MFC AppWizards..
how to use buttons ...
how to start an exe ... ( from the internet and tutorials )
how to create timers ...
ok man !!
|
|
|
|
|
Cougarxr7 wrote: I trully do not know where to start.
I do have visual C++ 6.0.
Select New from the File menu. Click the Projects tab. Select Win32 Console Application.
Cougarxr7 wrote: Write an app. that will copy 2 files...
Use CopyFile() .
Cougarxr7 wrote: ...and rename them.
Use rename() .
Cougarxr7 wrote: Then the the app will start an exe.
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Gr8Shag wrote: Hope that helps.
Probably not for Cougarxr7.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks guys. I have done some compiling and alot of reading!
I know I have alot more to do!
|
|
|
|
|
doh:
Must be an inside joke..?..
G
|
|
|
|
|
Not sure what you mean an inside joke??
I asked a question and got answers.
Nothing more than that!
Although some of the answers made me feel like they should of started with hey dumbass...
Anyway no big deal. I'll found a way to this, if not here then somewhere else.
Thanks!
-- modified at 15:30 Wednesday 12th April, 2006
|
|
|
|
|
Sorry Dude. I didn't read it right. Everybody has been super helpful
to me here and I'm kinda a space cadet.
Those links were extremely helpful to me and hopefully the will be to
you.
Everybody, sorry for the confusion. Been a ruff week.
G
|
|
|
|