|
Thanx, I tried the code and it works. When I first looked at it I thought it was for controls, but when I tried it worked.
|
|
|
|
|
hi
how can i open serial & parallel ports in win NT\XP
where _inp & _outp functions works only in win me
thanks
|
|
|
|
|
|
I have already gone through those messages to no avail, i have even tried passing keyboard values direct to the OnChar method of the CDateTime Control but when i pass them from the button presses, eg press one and send the appropriate stuff via OnChar it will not update, however via a normal keypress it does update. I am beginning to wonder if the CDateTimeCtrl is a bit of a 'funny' class unless you use it exactly in the way microsoft want you to!
|
|
|
|
|
Just like LoadLibrary.
Help me plz...
|
|
|
|
|
What do you want to do exactly?
What function do you need?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I need LoadLibrary from memory, not from file.
Just like:
BOOL MyLoadLibrary(PBYTE LibCode);
|
|
|
|
|
I know an assembly way, if interested send me a mail
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Wow..... It's realy?!
Send it to me: winddriver@msn.com
Thank u very much~~~~~~~~~~~
|
|
|
|
|
yes,the above mr say right,what file or function do you indeed want ?which
dll the function is in?
for example,i want to use GradientFill function in msinmg32.dll to draw gradient rectange
i can do this way:
hinst_msimg32 = LoadLibrary( "msimg32.dll" );
m_bCanDoGradientFill = FALSE;
if(hinst_msimg32)
{m_bCanDoGradientFill = TRUE;
dllfunc_GradientFill = ((LPFNDLLFUNC1) GetProcAddress( hinst_msimg32, "GradientFill" ));
}}
|
|
|
|
|
DLLs automatically use shared memory for READ-ONLY areas.
Due Regards
Mahendra
|
|
|
|
|
We are getting a link error (2001) only in release mode however everything is fine when I run rebuild in Debug. Obviously this isn't a lot of info, I am researching on MSDN right now, any suggestions? I have already read the VC++ FAQ.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Check in the Project Settings dialog box, the "Link" tab.
Make sure the libraries in the "Libraries" editbox are the same as in the debug configuration's "Libraries" editbox.
Bikram Singh
|
|
|
|
|
Thanks, I was missing two .lib files. I guess I must be having a case of the Mondays.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Nick Parker wrote:
I guess I must be having a case of the Mondays.
Thank goodness it's only a 24-hour bug!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
We all seem to have one of those once in a while!
Ant.
|
|
|
|
|
If you could dump the link errors here may be it would bemore usefull to comment on.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
If Value is NULL trying to set nValue to 0
is _com_error correct
TRY
{
nValue = recordset2->Fields->GetItem("Value")->GetValue();
}
CATCH_ALL(_com_error, e)
{
nValue = 0;
}
END_CATCH_ALL
|
|
|
|
|
CATCH_ALL only takes one parameter.
If you want to do want you suggest change thus
try<br />
{<br />
nValue = recordset2->Fields->GetItem("Value")->GetValue();<br />
}<br />
catch(_com_error& e)<br />
{<br />
nValue = 0;<br />
}
Other than that it will definately set nValue to 0 when a com error is thrown while reading the "Value" field.
Ant.
|
|
|
|
|
How to build a DataBase of data types (int, char, struct, …)?
I would like to build an ACCESS DataBase, containing information about all the data types we use.
For example:
Suppose, we have the following C/C++ code;
typedef char ARRAY_8_BYTES[8];
struct Foo1
{
int a[20];
int b;
ARRAY_8_BYTES a6;
char a[8];
};
struct Foo2
{
Foo1 foo1;
Foo1 *pFoo1;
char c[12];
};
Ideally, I’d like to have an ACCESS DataBase, containing data about the Foo1, Foo2 structures. So, I would be able to build a program, which uses this data base and (for instance) generates automatically the C code structure definitions above.
The questions I ask myself are:
1) How to organize data which is hierarchical by nature using a relational
data base such as ACCESS?
2) Are they better solutions than using ACCESS to solve this kind of
problem?
3) Do you know about other databases or commercial softwares that permit to
do this?
4) Could you please give me either a precise answer or links which can help
me?
Many, many Thanks.
|
|
|
|
|
It sounds like you need to preface each of your struct/class types with a specially-formatted comment. Then you could write a parser that would scan .h and .cpp files looking for known types (e.g., int , bool , char ) and the aforementioned comments.
While not directly related, back in the mid 90s, I started using a product by Eric Artzt called AutoDuck. It was a utility he developed while working for Microsoft. It scanned source files for special comments and created .hlp files for developers to use.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
The problem is NOT how to parse the .cpp, .h in order to build the DataBase, but how to build the data base.
I've just given (as an example only) the possibility to read the data base and to generate .cpp and .h files (and not the opposite)
Thank you anyway
|
|
|
|
|
Michigan1854 wrote:
...but how to build the data base.
Ahh, I overlooked that minor detail.
I would create an empty database, with all relevant tables, from within Access. Then create a DSN (from the ODBC applet in Control Panel). Next, derive a class from CRecordset , which will ask you for the name of the DSN previously created. When you need to add a record to the database, simply use the AddNew() and Update() methods of this class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I know how to access a data base, create by ACCESS from C++ (Using either ODBC, DAO or ADO).
What I do NOT know is how to organize data which is hierarchical by nature using a relational data base such as ACCESS?
If I had to deal with relational data, such as: (Table 1 related to Table 2)
Table 1: Client ID, Client Name, Client address
Table 2: Order number, Client ID
Client ID connects Table 1 to Table 2.
But how to organize in such tables recursive data.
struct FOO1
{
int a;
int b;
int c;
};
struct FOO2
{
struct FOO1 f1;
struct FOO3 f3;
....
};
|
|
|
|