|
maybe your fread reads ok but the byte after the 1st text block is a zero maybe and so the string appears to end there even though it doesn't actually ... remember that strings in c/c++ are zero-terminated
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Thanks for your reply.
The fread-function reads the tag correct (all 128byte are read),
but I can access only the the first ten("TAGBullion").
I thnk you're right, the 11th character seems to be a zero.
But how can I display and use the complete string then?
|
|
|
|
|
You might want to create a struct like this:
typedef struct MP3TAG {
LPSTR Title[x];
LPSTR Album[y];
....
}
and use that to read from the file.
"das leid schlaft in der maschine" -Einstürzende Neubauten
|
|
|
|
|
I'm trying to construct a SQL select query in the Open method of my CDaoRecordset derived class. What I'd like to do is this:
CMyRecordset* pMyRecordset = new CMyRecordset();
try
{
CString sqlStr = _T("SELECT DISTINCT Column FROM MyTable");
pMyRecordset->Open(dbOpenDynaset, sqlStr);
...
When I execute this, it complains that Column is not a member of the recordset. It is the name of the column in MyTable, however. So, I tried replacing Column with m_Column (the name of the member in the recordset). This results in a run-time exception stating: "Too few parameters. Expected 1".
Any suggestions for getting this to work?
Thanks.
Paul Ebert
|
|
|
|
|
ummm
all i can see is that column is a reserved word
maybe change the name of the column to mycolumn in the db and try
"SELECT DISTINCT mycolumn FROM mytable"
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
actually, "column" is not what I used, but rather "SessionId" (the name of the column). So, that's not it. Any other ideas? Or, any suggestions for where to look for help (in the way of documentation)?
Thanks.
Paul
|
|
|
|
|
Can anyone tell me what is the function of the following things:
_EXPORT
_PRIVATE
for example, _PRIVATE void initial(....) or _EXPORT xxxx ABC(...)
Also....
Do you know anything about the following data types:
LPARAM
LRESULT
WPARAM
The description in the HELP file cannot help me to understand.
Thanks.....
|
|
|
|
|
_export and _private are obsolte keywords as far as i know from the win16 days when doing dll bits
lparam, lresult, wparam are just macros (in effect) that map to underlying data types to allow transparent changes to the underlying types used, for example, wparam used to be a 16-bit parameter passed to a windows function in win3.x days ... in win32+ it became a 32-bit parameter ... if you used a native int type you would have to change your code when you moved platforms ... using the wparam type means you dont (unless you do wierd things with packed bit fields or something)
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
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"
|
|
|
|