|
Dear Michael,
Thank you very much for your advice. Its very much helpful.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Just load MS Word..... menu Tools/Macro and Record New macro..... do the operation you want to know the code, stop recording, go to Visual Basic Editor and see the code. You can get help for the objects and their methods too.
You can do everything by code.
Jaime
|
|
|
|
|
Dear Jaime,
Thank you very much for your reply. Its very much helpful and easy.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
CString m_sname ;
Rsc->PutCollect("s_name",_variant_t(m_sname));
The question is
when m_sname's value is 6B 62 7A FA 1B D4 A2 7C,
6B is 'k',62 is 'b',7A is 'z',D4 A2 is '寓'(chinese word),7C is '|',but 7A FA has no corresponding character .so 7A FA has
been changed to 3F('?') and stored .I want to know if some ways can solve this question.Thank you !
|
|
|
|
|
use nvarchar datatype in the SQL Server column
Jaime
|
|
|
|
|
sirtimid wrote:
db.Open(_T(""), FALSE, FALSE, "ODBC;DSN=MY_DSN");
I believe this should be (with added exception handling):
TRY
{
db.Open(NULL, FALSE, FALSE, "ODBC;DSN=MY_DSN");
}
CATCH(CDBException, pDBException)
{
...
}
END_CATCH But that's probably just a semantics thing.
sirtimid wrote:
Now I want to open the table "MyTable" from the database, how should I do this?
Derive a class from CRecordset using ClassWizard. It will ask you which table(s) the record set should operate on. After than, just instantiate an object of this new class, something like:
TRY
{
CMyRecordset rs(&db);
rs.Open();
if (! set.IsBOF())
{
rs.MoveFirst();
while (! rs.IsEOF())
rs.MoveNext();
}
}
CATCH(CDBException, pDBException)
{
...
}
END_CATCH
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
1)
The Class Wizard has a problem with MSAccess 2000 files. I you will need to make the same database with Access 97 and derive your classes with that.
2)
For MSAccess, using CDaoDatabase and CDaoRecordset are the better choice.
3)
Do like DavidCrow has written before.
MS
|
|
|
|
|
I have both Studio 6 and Studio .NET installed on one machine. I want to be able to attach to either debuggers via Task Manager right click "Debug" context menu item. I have figured out how to modify the "Debug" command for either studio (e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger). However, what I want is to add 2 items to the context menu of Task Manager so that I can choose which debugger I want. I haven't been able to find the location of Task Manager's context menu data in the registry which makes me think that it may not be alterable. Unless someone knows and I have overlooked - which I am hoping is the case.
Thanks!
|
|
|
|
|
Why not a simple EXE that acts as a proxy.
Once an attach has been requested, u pop up this exe and from it you have the various choices, and based on the choice, you invoke the correct debugger with the correct command line.
Something like :
"MSDEV -p procid -e procid"
I have to tell you that Studio .NET will nag that he aint the JIT debugger, so a workaround to this problem would be to set it as the JIT debugger then to reactivate yourself as the JIT debugger afterwards.
Good luck.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks for the response and suggestion, but I have successfully launched VC6 Debugger by altering the registry previously mentioned and haven't had a problem with the JIT debugger. If it turns out that I can't add to the context menu, I will pursue your suggestion.
Thanks!
|
|
|
|
|
Maybe i didnt make it clear, but VC6 would attach happily by just using the command line, VS.NET would nag if he finds out he's not the prefered JIT
Another choice is like it is suggested in the other post, to attach from within the interface.
For me i find it much easier to have a small exe where i can chose directly my debugger for the current problem, would it be VC6 VS.NET, WinDbg, OllyDbg or ... let it crash!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You can't modify task-manager but both VS.NET and VS6 allow you to attach to a running process. The option is on the debug menu of VS.NET and on the Build->Start Debug menu of VC6.
Michael
CP Blog [^]
|
|
|
|
|
Thanks - I am aware of that, but I am falling in line with the adage that "Programmers are lazy."
|
|
|
|
|
Jnewg5 wrote:
Thanks - I am aware of that, but I am falling in line with the adage that "Programmers are lazy."
As a lazy programmer myself, I find using the VS.NET menu easier and quicker, but then again it is very rare that I need to debug an app built by VS6. Only got one supported product using it now.
Michael
CP Blog [^]
|
|
|
|
|
As a lazy programmer myself, i made a small utility that runs in the background, when i press CTRL + F1 it automatically attaches the application i preconfigure it with into the debugger of my choice.
This utility also records some macros and send some keystrokes.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Papa wrote:
i made a small utility that runs in the background, when i press CTRL + F1 it automatically attaches the application i preconfigure it with into the debugger of my choice.
This utility also records some macros and send some keystrokes.
Cool. Have you posted it as an article? Sounds like it might be a useful tool for your fellow CPians. I don't debug many running processes, so it probably wouldn't save me much time but it might help some others.
Michael
CP Blog [^]
|
|
|
|
|
Not yet.
I guess i will in the near future, but i know it can make my daily tasks easier, cos in order to test our system, we should enter a username password, so just imagine the number of times you enter those
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I want to open and edit a Microsoft Access 2000 (mdb) file by using the CDatabase and CRecordset classes in Microsoft Visual C++ 6.0.
I open the database using the following command:
db.Open(_T(""), FALSE, FALSE, "ODBC;DSN=MY_DSN");
Now I want to open the table "MyTable" from the database, how should I do this?
I tried the following code, but it threw me an exception at file "dbcore.cpp" at line 66.
CRecordset rs(&db);
rs.Open(CRecordset::dynaset,"MyTable",CRecordset::none);
Does anyone know why this error occured and how can I open that table correctly?
Thanks in advance
|
|
|
|
|
Hello everyone,
I'm still struggling with my classes hierarchy. Now, what I have is pure abstract interfaces classes and correspondent to them objects classes, which are actually hidden inside dll.
API.h
<br />
class __declspec(dllexport/dllimport) CxID {<br />
public:<br />
static const int GetID();<br />
private:<br />
static int iID;<br />
};<br />
class IxA {<br />
virtual int GetA() = 0;<br />
};<br />
class IxB_Only {<br />
virtual int GetB() = 0;<br />
};<br />
class IxB: public IxA, public IxB_Only {<br />
};<br />
<br />
extern __declspec(dllexport/dllimport) IxB *GetObject();
DLL.h
<br />
#include "API.h"<br />
class CxA: public CxID, public IxA {<br />
public:<br />
int GetA() { return 0xAA; }<br />
private:<br />
ID m_ID;<br />
};<br />
class CxB: public CxA, public IxB_Only {<br />
int GetB() { return 0xBB; }<br />
};<br />
DLL.cpp
<br />
CxB *g_pObj;<br />
BOOL APIENTRY DllMain(...) {<br />
...<br />
case DLL_PROCESS_ATTACH:<br />
g_pObj = new CxB();<br />
break;<br />
...<br />
}<br />
<br />
__declspec(dllexport/dllimport) IxB *GetObject() {<br />
return (IxB*)g_pObj;<br />
};<br />
Now, in application:
<br />
IxB *pObj = GetObj();<br />
So, what I want to achive by doing that is to be able to cast B object, which is hidded in dll and not known to user, to public ifaces iB and iA.
But, I have a problem. (Sorry for such long introduction)
When I debug my app I see this:
pObj
|--[CxB]
| |--CxA
| | |--IxA __vfptr with good address and fuctions
| |--IxB_Only __vfptr with good address and functions
|--IxA __vfptr with good address and functions
|--IxB_Only __vfptr with... 0xcdcdcdcd and error CXX0030: expression cannot be evaluated
It's obvious when I do pObj->GetB() I get "Access violation".
I have no idea what is wrong. It must work, I know it. But I can't see the flaw.
Please, plase, plase, somebody, any clue?
Thanks in advance.
|
|
|
|
|
Is it possible that the problem lies within your constructors ?
|
|
|
|
|
Hail Darkbyte,
No, simply because I don't have anything in C-tors except zeroing a couple of integers.
Thanks for the answer though.
|
|
|
|
|
Salam From Hafiz
Serial Port Communication is my
interresting topic,I want to
work at it if some one know
about it tell me to create
(establish) serial connection
thanks From Hafiz
|
|
|
|
|
Hain buddy,
just Search CSerialPort Class in Codeproject,that will really help you in you cause.
khuda hafiz
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Check out MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
Kuphryn
|
|
|
|
|
I am doing realtime video manipulation software... so far, I am capturing frame from a camera, saving it to a disk and then retriveing it, converting to array of integers, and then do the manipulation.
Here I get about 2fps which is not acceptable.
Is there way to grab a frame and point where the image is the RAM and change pixels there?
in VC++ or VB6
thanks
|
|
|
|