|
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"
|
|
|
|
|
You don't say what windows platform you're developing for....
Just a few questions, then I may be able to help you.
Hardware:
Is it a new piece of hardware?
Off the shelf or in-house
Operating system:
XP/Win2k/NT4 or ME/98/95
Type of driver you are developing:
Kernel mode, user mode or both? (Or 'don't know'.)
If you are developing for NT based OS's, as far as books go, the 'classic' text is "The Windows NT Device Driver Book : A Guide for Programmers" by Art Baker, still relevant for Win2K, but a little dated now. (If you can get a cheap(==free) copy, it's worth having)
He has updated the book for Win2K, it's cunningly titled "The Windows 2000 Device Driver Book : A Guide for Programmers"
I have the first one, haven't got the latest one. The book is still useful, but if your a newbie, get the latest Win2K version.
You could also try "Windows NT Device Driver Development " by Peter Viscarola & W. Anthony Mason, another good book, which I also have. More up to date than the first Art Baker book, but published before Win2K was released.
The (first)Art Baker book is more of a "Device Driver Cookbook" then the Viscerola one.
Plenty of help is available in the DDK, (which is freee to download from MSDN now). But I recommend you get a book too.
Read the book reviews on Amazon.com, all three titles I have mentioned have been reviewed there.
(p.s. I also have another device driver book, but it's at home & I can't remember the title right now).
|
|
|
|
|
Ok,
I want to write the driver in the first way for win98 and maybe later for 2000. I can`t say anything about the mode you asked for. I have many experience with Win32-API but this driver stuff is totally new to me, so at first I have to learn the basics about the model.
Let me explain what we are trying to do, so maybe you can give some advice where to start.
Actually we are developing a midi-interface ( 19" - outside the pc ) which we want to configure and use via a pc. The configuration and midi-data transmission should go via rs232. So if someone uses a sequencer-soft like Cubase or whatever our external midi-device should have an entry in the output-device list and the app should sent the midi-data through the internal RS232 to our device.
I have heard about a book called PROGRAMMING THE WINDOWS DRIVER MODELL from MS-PRESS. Do you know this book ?
Greatings Mario ///
----------------------
www.klangwerker.de
mario@klangwerker.de
----------------------
|
|
|
|
|