|
This is the real problem: detect the status of a call (determining the HCALL handle and using lineGetCallStatus) of a child process (created using CreateProcess) from the parent process.
At least I'd like to intercept TAPI messages (can't use PeekMessage?).
That's because the child process is a special program I can't avoid to launch to connect to internet, and when it finds a "fast busy", I need to re-launch it (since this situation isn't managed by this child process).
Since this situation can show more than 120 times (!!!), I need to automatize this task.
THANKS.
|
|
|
|
|
This is the real problem: detect the status of a call (determining the HCALL handle and using lineGetCallStatus) of a child process (created using CreateProcess) from the parent process.
At least I'd like to intercept TAPI messages (can't use PeekMessage?).
That's because the child process is a special program I can't avoid to launch to connect to internet, and when it finds a "fast busy", I need to re-launch it (since this situation isn't managed by this child process).
Since this situation can show more than 120 times (!!!), I need to automatize this task.
THANKS.
|
|
|
|
|
Does anybody know how to get data stored into VARCHAR data field of Interbase using ADO and Visual C++?
Regards,
Mukhit
|
|
|
|
|
Hi All,
Does anyone know a simple class/method that performs
URL encoding and can be used to encode data for HTTP POST
requests?
-Michael
|
|
|
|
|
I found this over on soureforge, it should do what you want
http://sourceforge.net/snippet/detail.php?type=snippet&id=100053
|
|
|
|
|
I found this over on soureforge, it should do what you want
http://sourceforge.net/snippet/detail.php?type=snippet&id=100058
|
|
|
|
|
How do can I have my c++ program do unix commands while the program is running. For instance I get the user to input a source and destination path of a file, then i have c++ copy that file from the source to the destination. like using the (cp /source /destination) in unix. Now lets say i dont want to just copy, maybe i want to execute some other application then when that application is finished running i want to return to the c++ program to do some more things. How do i do this? Basically i want my c++ program to do unix commands like cp, mv, ./, chmod.. etc... Please help.
|
|
|
|
|
basically you are talking about writing a shell (like the unix shells or msdos) and that isnt actually a trivial task ... to run things in sequence and get return values and pass command lines would require a batch language of some sort
it would be easy enough to write a *very* simplified shell type thing that could do basic stuff but for more advanced capabilities you will have to do some more in-depth studying of shells
sorry there isnt a CMyShell class that does it for you (well not one i know of anyways)
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I have a TAPI program using TAPI version 2.2. It works fine in Win98, but I got some problems in Win2000. I made a call without an owner. When the transaction was down, I did lineDrop(), lineDeallocateCall(), lineClose(), and lineShutdown(). But if I made a new call, the lineMakeCall() returned me an error LINEERR_ALLOCATED. Seems like I couldn't release the resource in Win2000. Could anybody give me some idea to solve this problem? Thank you so much!
|
|
|
|
|
i know there are some differences between tapi 2.x and tapi 3.x ... win2k uses tapi 3.x so check for the problem there
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi everyone, Im new to this VC++ business and am having a few 'issues' with activex controls on dialogs...
Ive inserted an activex control onto a dialog and created a member variable in the dialog class to 'host' it. I get the main wrapper class for the control generated fine and two other coclasses which I need to access some members of the control. The main wrapper class is derived from CWnd and the coclasses are derived from COleDispatchDriver.
I can use the member variable reference to the control fine except I cannot instantiate an instance of either of the two coclasses. Ive got code that looks like this....
SomeFunction()
{
CCoclass pMyInstance;
MyInstance = m_MyMemberControl.GetCoClassThingy();
}
When I compile I get a message saying something about the coclass not being defined, yet the headers and definitions are there; as generated by class wizard.?????
Anyone tell me whats going on, how do I use these coclasses to access objects within the activex control???
Prrreeeeeezzeee eddddieeee!!!
)
James Bush.
5+years Pro VB&ORACLE (OOD, ADO etc...) MS VC++ newbie!
|
|
|
|
|
How can I minimize or hide a window that the project shows when I made a system call like this : system("rsh ...")? Thanks
|
|
|
|
|
Im don't know coputer
but I am testing Roger Cabel pc here
Enumerate the Windows on the screen. Then call window hide or mininmize on the window you want.
I know it will be hard when you are in DOS Shell windows, how ever you can get the Information of the Process by calling the GetBufferInfo
I think
|
|
|
|
|
can u use CreateProcess(...) instead? and are u running on win2k? if so you can simply use the CREATE_NO_WINDOW flag as part of the call
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I have to implement two working ways, and I've thought in the property sheet, as you can see in the code below, I'm trying to add and remove property pages, but this way don't works.
Note:
i beg your pardon because of my english and because this can be like a big mess: this is an industrial keyboard...
Thank you in advance.
if (bManual)
{
if ((this->GetActivePage() == &this->m_ProgramaNCExecPPDlg) || (this->GetActivePage() == &this->m_ProgramaNCSimulacioPPDlg))
{
this->AddPage(&this->m_ProgramaNCEdicioPPDlg);
this->RemovePage(&this->m_ProgramaNCExecPPDlg);
this->RemovePage(&this->m_ProgramaNCSimulacioPPDlg);
this->m_ProgramaNCExecPPDlg.Create(IDD_PROGRAMA_EDICIO_PP,this);
this->SetActivePage(&this->m_ProgramaNCEdicioPPDlg);
this->m_ProgramaNCEdicioPPDlg.SetTextProgramaNCE(this->m_ProgramaNCDoc.GetTextProgramaNCE());
}
}
else
{
if (this->GetActivePage() == &this->m_ProgramaNCEdicioPPDlg)
{
this->AddPage(&this->m_ProgramaNCExecPPDlg);
this->AddPage(&this->m_ProgramaNCSimulacioPPDlg);
this->RemovePage(&this->m_ProgramaNCEdicioPPDlg);
this->SetActivePage(&this->m_ProgramaNCExecPPDlg);
this->m_ProgramaNCExecPPDlg.SetTextProgramaNCF(this->m_ProgramaNCDoc.GetTextProgramaNCF());
}
}
|
|
|
|
|
How do I write a file to an edit ctrl or to other ctrl?
I need to disply the file on a formview to the user.
|
|
|
|
|
we load the file into a memory buffer (a cstring would do too) and then use SetWindowText using the handle to the control (or a control variable if you have one mapped) or use the ddx routines if the variable (say the cstring) is mapped to the control
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
also...
if these files are coming from non windows sources (or even from many windows sources) you'll need to replace all lone "\n" characters with "\r\n".
if you don't, the new lines will show up as little black rectangles in the edit control.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
oooops!
forgot that bit
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I need to insert a large number of records in a database table. Table has a SQL_LONGVARBINARY field. I tried SQLSetPos, but I cannot bind to the SQL_LONGVARBINARY field, so does not work. I can insert records one by one, but not a bulk. Does anybody know how to do it?
Regards.
A.B.
|
|
|
|
|
looking thru the docs for sql svr 7 it seems you can use bcp to update multiple records in one go but i dont know whether you can insert multiple records from multiple values in one go so to speak
we use bcp to populate the db at setup where we have to insert loads of data at once
what db are u using? can u post some code to look at?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Thanks,
I've already found out. If you are interested, here is the snippet
SQLHSTMT hStmt; // Statement handle.
SQLHDBC hDbc; // Connection Handle.
SQLHENV hEnv; // Environment Handle.
UINT s = MAX_JOBDESC_SIZE * R_SIZE;
BYTE * Storage = new BYTE[ s ];
SQLINTEGER * WordRecordID = new SQLINTEGER[R_SIZE]; // Job ID Field Buffer
SQLINTEGER * WordRecordIDLength = new SQLINTEGER[R_SIZE]; // jobID Length Array
SQLINTEGER * FileIndex = new SQLINTEGER[R_SIZE];
SQLINTEGER * FileIndexLength = new SQLINTEGER[R_SIZE];
SQLINTEGER * WordDescLength = new SQLINTEGER[R_SIZE];
SQLRETURN rc; // Return code
SQLINTEGER value, i;
// BLA- BLA -BLA: Connect, cursor options etc
// One of them is SQL_ROWSET size:
rc = SQLSetStmtOption(hStmt,SQL_ROWSET_SIZE,R_SIZE);
CheckError(hStm);
//Then
rc = SQLExecDirect(hStmt,(SQLCHAR*)"SELECT * FROM WORDS",SQL_NTS);
CheckError(hStmt);
rc = SQLBindCol(hStmt,1,SQL_C_SLONG,WordRecordID,sizeof(LONG),WordRecordIDLength);
CheckError(hStmt);
rc = SQLBindCol(hStmt,2,SQL_C_SLONG,FileIndex,sizeof(LONG),FileIndexLength);
CheckError(hStmt);
rc = SQLBindCol(hStmt,3,SQL_C_BINARY,Storage,MAX_JOBDESC_SIZE,WordDescLength);
CheckError(hStmt);
LONG Size = 0 ;
if (SQLFetch(hStmt)!= SQL_NO_DATA)
// Set Position API.
{
/*Put data ( copy ) into Storage,FileIndex,WordRecordID and their length arrays. Then: */
rc = SQLSetPos(hStmt,0,SQL_ADD,SQL_LOCK_NO_CHANGE);
CheckError(hStmt);
}
/* Clean up, disconnect*/
Thanks again.
Alex Barzovski
|
|
|
|
|
Thanks,
I've already found out. If you are interested, here is the snippet
SQLHSTMT hStmt; // Statement handle.
SQLHDBC hDbc; // Connection Handle.
SQLHENV hEnv; // Environment Handle.
UINT s = MAX_JOBDESC_SIZE * R_SIZE;
BYTE * Storage = new BYTE[ s ];
SQLINTEGER * WordRecordID = new SQLINTEGER[R_SIZE]; // Job ID Field Buffer
SQLINTEGER * WordRecordIDLength = new SQLINTEGER[R_SIZE]; // jobID Length Array
SQLINTEGER * FileIndex = new SQLINTEGER[R_SIZE];
SQLINTEGER * FileIndexLength = new SQLINTEGER[R_SIZE];
SQLINTEGER * WordDescLength = new SQLINTEGER[R_SIZE];
SQLRETURN rc; // Return code
SQLINTEGER value, i;
// BLA- BLA -BLA: Connect, cursor options etc
// One of them is SQL_ROWSET size:
rc = SQLSetStmtOption(hStmt,SQL_ROWSET_SIZE,R_SIZE);
CheckError(hStm);
//Then
rc = SQLExecDirect(hStmt,(SQLCHAR*)"SELECT * FROM WORDS",SQL_NTS);
CheckError(hStmt);
rc = SQLBindCol(hStmt,1,SQL_C_SLONG,WordRecordID,sizeof(LONG),WordRecordIDLength);
CheckError(hStmt);
rc = SQLBindCol(hStmt,2,SQL_C_SLONG,FileIndex,sizeof(LONG),FileIndexLength);
CheckError(hStmt);
rc = SQLBindCol(hStmt,3,SQL_C_BINARY,Storage,MAX_JOBDESC_SIZE,WordDescLength);
CheckError(hStmt);
LONG Size = 0 ;
if (SQLFetch(hStmt)!= SQL_NO_DATA)
// Set Position API.
{
/*Put data ( copy ) into Storage,FileIndex,WordRecordID and their length arrays. Then: */
rc = SQLSetPos(hStmt,0,SQL_ADD,SQL_LOCK_NO_CHANGE);
CheckError(hStmt);
}
/* Clean up, disconnect*/
Thanks again.
Alex Barzovski
|
|
|
|
|
Hi,
anybody here who made experience in driver-development or knows good books, good links about the driver-model ...
Thanks ... Mario ///
----------------------
www.klangwerker.de
mario@klangwerker.de
----------------------
|
|
|
|
|
goto http://www.numega.com/drivercentral/driverstudio.shtml and skwizz thru some of the links there ... they have some samples and stuff ... prolly mostly to advertise their product but it might have other links from it
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|