Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCaputuring all keystrokes Pin
SAK27-May-03 18:42
SAK27-May-03 18:42 
GeneralRe: Caputuring all keystrokes Pin
J. Dunlap27-May-03 19:35
J. Dunlap27-May-03 19:35 
GeneralRe: Caputuring all keystrokes Pin
SAK28-May-03 6:01
SAK28-May-03 6:01 
Questionhow can I close a windows process from a windows sevice Pin
fftongzhi27-May-03 17:50
fftongzhi27-May-03 17:50 
AnswerRe: how can I close a windows process from a windows sevice Pin
billdwilson328-May-03 10:27
billdwilson328-May-03 10:27 
GeneralRe: how can I close a windows process from a windows sevice Pin
fftongzhi28-May-03 15:08
fftongzhi28-May-03 15:08 
Generalshog9,please help me Pin
swandream27-May-03 17:25
swandream27-May-03 17:25 
Questionhow can I open a database in one NT service? Pin
diyzhao27-May-03 17:10
diyzhao27-May-03 17:10 
I make a windows service with ATL,and when I want to open a database in the service work thread(I creat a new thread), it doesn't work??? And when start the service in SCM, a error show: debug error ??? I don't know why?
Please help me , and if you have one sample ,give me one?

and my code below:
//if( !m_db.Open( _T("SmsSendBuff"),FALSE,TRUE,_T("ODBC;UID=saWD=") ) )
//these two open operation doesn't work both!!!
//if(!m_db.OpenEx("DSN=SmsSendBuff;UID=saWD=",CDatabase::noOdbcDialog);

_ConnectionPtr Conn1("ADODB.Connection") ;
HRESULT hr=Conn1.CreateInstance( __uuidof( Connection ) );
_bstr_t bsDSN = (L"SmsSendBuff");
_bstr_t bsEmpty = L"";
Conn1->ConnectionString = bsDSN;
//hr = Conn1->Open("dsn=SmsSendBuff;uid=sa;pwd=;","","",0);
AfxMessageBox("open...db");
hr=Conn1->Open(bsDSN,_bstr_t("sa"),_bstr_t(""),-1);/*bsEmpty, bsEmpty, bsEmpty, -1 );*/

my email and msn: diyzhaodiyzhao@hotmail.com
I'll be appreciated if getting your help!Thank you!
AnswerRe: how can I open a database in one NT service? Pin
WoutL28-May-03 1:00
WoutL28-May-03 1:00 
AnswerRe: how can I open a database in one NT service? Pin
Peter Weyzen28-May-03 10:21
Peter Weyzen28-May-03 10:21 
GeneralRe: how can I open a database in one NT service? Pin
diyzhao28-May-03 14:39
diyzhao28-May-03 14:39 
GeneralRe: how can I open a database in one NT service? Pin
Peter Weyzen28-May-03 16:00
Peter Weyzen28-May-03 16:00 
GeneralRe: how can I open a database in one NT service? Pin
diyzhao28-May-03 17:45
diyzhao28-May-03 17:45 
GeneralFirst frame of an compressed AVI Pin
Jürgen Eidt27-May-03 17:00
Jürgen Eidt27-May-03 17:00 
GeneralRe: First frame of an compressed AVI Pin
Andrew Walker27-May-03 21:00
Andrew Walker27-May-03 21:00 
GeneralRe: First frame of an compressed AVI Pin
Jürgen Eidt27-May-03 21:58
Jürgen Eidt27-May-03 21:58 
GeneralCreate a Transperent Bitmap on a running video Pin
Abhi@Work27-May-03 15:15
Abhi@Work27-May-03 15:15 
GeneralRe: Create a Transperent Bitmap on a running video Pin
John R. Shaw27-May-03 21:08
John R. Shaw27-May-03 21:08 
Generalactivex control in raw win32 api dialog Pin
Roman Nurik27-May-03 14:42
Roman Nurik27-May-03 14:42 
GeneralRe: activex control in raw win32 api dialog Pin
Michael Dunn27-May-03 15:00
sitebuilderMichael Dunn27-May-03 15:00 
GeneralRe: activex control in raw win32 api dialog Pin
Roman Nurik27-May-03 15:02
Roman Nurik27-May-03 15:02 
GeneralRe: activex control in raw win32 api dialog Pin
Michael Dunn27-May-03 18:00
sitebuilderMichael Dunn27-May-03 18:00 
Generaladd DIALOGBAR Pin
aguest27-May-03 13:52
aguest27-May-03 13:52 
QuestionPutting Buttons in the view? Pin
Cambalindo27-May-03 13:32
Cambalindo27-May-03 13:32 
AnswerRe: Putting Buttons in the view? Pin
valikac27-May-03 14:26
valikac27-May-03 14:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.