|
One way:
fopen("error.log", "w"); Other ways exist, too.
"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 for the I just couldn't help it.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
I am trying to port a C++ code project to C#. I am stuck on this code snippet. Can you please tell me what the DWORD RESERVED[2] means in the following struct? I have never seen anything like it before. It looks like a mixture of number and array.
struct TRAYDATA
{
HWND hwnd;
UINT uID;
UINT uCallbackMessage;
DWORD Reserved[2];
HICON hIcon;
};
|
|
|
|
|
Two DWORD s, nothing more than that or a 8-byte buffer just taking up space.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
James, thanks for pulling me through. All this C++ nuances can drive you nUtZ!
|
|
|
|
|
Hi,
I have unisnstalled Express edition 2005,
But back to VC++6.0 I can compile but Iat the execution, always the two errors:
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/Listing3-3.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Listing3-3.exe - 2 error(s), 0 warning(s)
Despite the fact that I look at the help on line, I cannot manage to use crrectly VC++6 again,
thanks,
Regards
|
|
|
|
|
have you tried to rebuild all your workspace ?
did you also look in the project if there was really a main() function ??
|
|
|
|
|
|
I am new to DLL. I developed a DLL followed the basic dll instruction such as declare __declspec(dllexport) in dll generation, and declare __declspec(dllimport) in dll client, but I still got error as: error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl voidtry(int)" (__imp_?voidtry@@YAXH@Z) referenced in function _main. Thanks for any suggestions.
|
|
|
|
|
do you link statically to the lib file, or dynamically to the dll ??
seems that you have a name mangling problem.
|
|
|
|
|
Thanks for your reply. I am new to DLL, and I am not sure what is statically or dynamically. How I use is "#pragma comment(lib, "audiolib.lib")". Thanks again.
|
|
|
|
|
are you refering to any .lib file??, if so try adding it in the LINK option. and use dumpbin utility to check if the function is actually getting exposed in the dll.
VuNic
|
|
|
|
|
Thanks for your suggestion. I did refer some lib I built with DLL, and I also included the lib in the project using "#pragma comment(lib, "aacresample.lib")". I tried the dumpbin, but I did not know if the dll and lib I built are correct. I saw those definations of export functions, but I did not know if they were right. Below is the result from dumpbin dll.
///////////////////
Dump of file aacresample.dll
File Type: DLL
Section contains the following exports for aacresample.dll
0 characteristics
44146867 time date stamp Sun Mar 12 13:28:55 2006
0.00 version
1 ordinal base
4 number of functions
4 number of names
ordinal hint RVA name
1 0 0001104B _CopyResamplerState@4
2 1 00011271 _CreateSplineResampler@12
3 2 000111E5 _SplineResample@20
4 3 000111C7 _voidtry@4
Summary
D000 .data
1000 .idata
2000 .rdata
1000 .reloc
1000 .rsrc
8000 .text
10000 .textbss
///////////////////////////
Thank you.
|
|
|
|
|
hi
I have downloaded the mysql++ from here, i got the link from www.mysql.com download page
http://tangentsoft.net/mysql++/releases/mysql++-1.7.1-win32-vc++.zip
iam using this version as im using vc++6
when extracted there is serveral folders labled "lib" and "include" which ones do i copy to my "lib" and "include" folders on my pc?
is there a better wrapper out there or a site that gives good examples on using the mysql++ wrapper with vc++6
thanks
|
|
|
|
|
if i copy all of them in and use
#include <mysql++>
then in the code do a connect as below
Connection con("login","localhost","root","abc");
i get the following errors and warnings
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(39) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(159) : warning C4800: 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(172) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(176) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(180) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\type_info1.hh(184) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\convert1.hh(40) : warning C4273: 'strtol' : inconsistent dll linkage. dllexport assumed.
c:\program files\microsoft visual studio\vc98\include\convert1.hh(41) : warning C4273: 'strtoul' : inconsistent dll linkage. dllexport assumed.
c:\program files\microsoft visual studio\vc98\include\sql_query1.hh(37) : warning C4800: 'class SQLQuery *' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\sql_query1.hh(135) : warning C4355: 'this' : used in base member initializer list
c:\program files\microsoft visual studio\vc98\include\compare1.hh(48) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\result1.hh(33) : warning C4355: 'this' : used in base member initializer list
c:\program files\microsoft visual studio\vc98\include\result1.hh(42) : warning C4800: 'char' : forcing value to bool 'true' or 'false' (performance warning)
Linking...
mysqlDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall MysqlConnection::~MysqlConnection(void)" (??1MysqlConnection@@QAE@XZ)
mysqlDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall MysqlConnection::MysqlConnection(char const *,char const *,char const *,char const *,bool)" (??0MysqlConnection@@QAE@PBD000_N@Z)
Debug/mysql.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
|
|
|
|
|
Is there a lib included in the package you downloaded?
If yes, you have not added it to your project. ( project, options, linker )
If you have sourcecode, add the sourcefiles ( the .c or .cpp ) to you project.
Your trace shows many warnings because you initialise some variables you never use and then the constructor from MysqlConnection is not found.
|
|
|
|
|
there is two librarys in different folders, there is mysql++.lib and libmySQL.lib
if you download the zip file you will see the chaos iam on about
how do you add them in vc++6 if they do have to be added, they way abou tyou mentioned appears to be for a later version.
many thanks
|
|
|
|
|
In VC6, go to project ment, the to properties ( ok, I have a german version, so I don't know the exact name. )
There you find on the left side your build-targest, and on the right side a tab-control.
In the tab, ther is a page called "linker". Go to it, There is a edit "Objects, libs". Add your library there. Then, click on category and point to input. There add your additional library-path. That's all.
Good luck!
|
|
|
|
|
did all that and now get the error
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
so if select the option in properties of "ignore all default libraries" i then get over 200 errors!!
|
|
|
|
|
Hi all,
I want to "control" an application with a second one. The app it there to control a Hardware and I don't have the code
It is command-based: I can write a command in a CEdit-like window, and the response is displayed in the same window. ( a Hexdump, maybe )
Is it possible to grap the contents of this window and to write ( from my own app ) into it?
Somethink like enumerateWindow and then access over the clipboard?
Thanks , Hardy.
|
|
|
|
|
If you have a handle to the (edit) control, you can use GetWindowText() to get its contents.
"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
|
|
|
|
|
DavidCrow wrote: If you have a handle to the (edit) control, you can use GetWindowText() to get its contents.
I think its not so simple. The Application ( A1 ) to control the Hardware is ready and closed.
I am writing a new App ( A2 ) , in mfc, to do some extra-work. Now I want to access A1`s main window. I want to write to it and read from it from within A2.
Thanks,
Hardy.
|
|
|
|
|
Hardy_Smith wrote: The Application ( A1 ) to control the Hardware is ready and closed...Now I want to access A1`s main window.
How do you expect to read from a non-existent window?
"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
|
|
|
|
|
With closed I mean closed-source. I don't have the source.
The window itselve is open, of course.
Sorry, it was not clear.
|
|
|
|
|
Like I said before, get a handle to the (edit) control (using FindWindow() ), then use GetWindowText() to get its contents.
"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
|
|
|
|