|
A code page is simply a mapping of a byte value to a glyph. Only a person can tell if text is being mapped using the right codepage - they have to look at the output and decide if it looks correct. To the computer it's all just bytes.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
So how does the VS.NET finds this out?
The Advanced Save As... popup indicates the correct code page of a text file, try it.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
I want to integrate MSCOMM.ocx into another ATL component. First I create
a composite control in the ATL component. Second I insert the MSCOMM.ocx into
the component. It creates two files mscomm.cpp and mscomm.h. Then I declare a
variable of CMSCOmm class. I don't know how to bind the variable and the control ID( Like the MFC: DDX_Control ). So I attach the hwnd of the control to the variable. But when I run, it will throw an assert on the line:
ASSERT( m_pCtrlSite != NULL );
Who can help me solve this problem?
|
|
|
|
|
Hi everybody!
I have a typical problem here. My application is a multithreaded one. In one of the cases, there are multiple threads which will be using a common buffer which is a member variable of a particular class. This buffer is also allocated memory by one of these threads and to be accessed by the other threads. I am getting a dbg_heap error as debug assertion. How do i go about solving this problem. Please help me out as this is very urgent. Thanx in advance.
regards,
sailesh
|
|
|
|
|
If all of your threads are launched within the same program (i.e. there are no DLLs or external libs involved) then your problem most likely has nothing to do with multithreading issues, but rather chances are you're somehow corrupting the buffer (by writing out of its bounds, for instance.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Does anybody know some easy library or source code for voice
generation and recognation. I don't want to use windows
SAPI.
|
|
|
|
|
There are none.
Both subjects are inherently non-"easy".
|
|
|
|
|
Jep. I know, subjects are quite difficult. That's is reason I would
find them somewhere. Microsoft SAPI wuold be nice, but i don't
want to use it.
|
|
|
|
|
Kristian33 wrote:
Microsoft SAPI wuold be nice, but i don't
want to use it.
Why? Is it some random decision?
|
|
|
|
|
I am trying to use ADO to call an Oracle stored procedure, and it just hangs. It's just a simple insert, and doing it as a normal insert crashes with 'invalid character', but writing the same query to disk and passing it to Oracle by hand works fine.
Any Oracle gurus out there with any suggestions ?
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Christian Graus wrote:
doing it as a normal insert crashes with 'invalid character'
Do you have a trailing ';' in the query text this is the most common mistake which people do while passing ADO queries to Oracle.
|
|
|
|
|
Tried it with and without. Also copied it directly into a bootstrap and it works fine there.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Did you try dumping the Command.CommandText property or rs.Source to Debug log and running it using SQL*Plus. I am sure about one thing ';' ain't going to work. It may be happening that while constructing the query something may have comeup like quotes which oracle doesnot like. This is what I was hinting yesterday when I was telling you about unfriendly oracle error messages. "Invalid character" doesnot mean anything atleast if position is indiacted I am willing to give them a 'C'. Anyway good luck!
|
|
|
|
|
Rama Krishna wrote:
Did you try dumping the Command.CommandText property or rs.Source to Debug log and running it using SQL*Plus.
Yes, I did that and it all worked fine in SQL+, that was a big part of my confusion.
Rama Krishna wrote:
It may be happening that while constructing the query something may have comeup like quotes which oracle doesnot like.
I streamed the query to a file, and when put direct into SQL+ or a bootstrap we wrote, it works fine.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
If you have not already solved it. I did find one thing strange. If you run the exe from a network share or for that matter any compnent comes from a Network Share, I have seen this error occur. It took me 3 days to track this problem.
|
|
|
|
|
Can you post the ADO code. I've had a lot of bother with Oracle and ADO so I might be able to spot something.
What version of Oracle client and MDAC do you have installed?
Michael
"Eureka" is Greek for "This bath is too hot"
|
|
|
|
|
Thanks - I am at work again and so able to post it...
_variant_t vRecordsAffected;
_variant_t vtParams = vtMissing;
m_pConnection->BeginTrans();
bTransactionStarted = true;
_CommandPtr pcmdInsertBinaryData (__uuidof(Command));
pcmdInsertBinaryData->ActiveConnection = m_pConnection;
/*
ostringstream ss;
ss << "INSERT INTO "
<< "tblAttachmentVersions "
<< " (QFileid, RevisionCount, filename, mimetype) "
<< " VALUES "
<< " ( " << nQFileID << ", " << lDataID << ", '" << b_tFileName << "', '" << b_tMimeType << "' );";
pcmdInsertBinaryData->CommandText = ss.str().c_str();
pcmdInsertBinaryData->CommandType = adCmdText;
pcmdInsertBinaryData->Execute(&vRecordsAffected, &vtParams, adExecuteNoRecords);
//*///
pcmdInsertBinaryData->CommandText = "QFile_InsertAttachment";
pcmdInsertBinaryData->CommandType = adCmdStoredProc;
_ParameterPtr pprmInsert;
pprmInsert = pcmdInsertBinaryData->CreateParameter("QFileID", adInteger, adParamInput, 0, _variant_t(nQFileID, VT_I4));
pcmdInsertBinaryData->Parameters->Append(pprmInsert);
pprmInsert = pcmdInsertBinaryData->CreateParameter("DataID", adInteger, adParamInput, 0, _variant_t(lDataID, VT_I4));
pcmdInsertBinaryData->Parameters->Append(pprmInsert);
pprmInsert = pcmdInsertBinaryData->CreateParameter("FileName", adBSTR, adParamInput, 255, b_tFileName);
pcmdInsertBinaryData->Parameters->Append(pprmInsert);
pprmInsert = pcmdInsertBinaryData->CreateParameter("MimeType", adBSTR, adParamInput, 255, b_tMimeType);
pcmdInsertBinaryData->Parameters->Append(pprmInsert);
pcmdInsertBinaryData->Execute(&vRecordsAffected, &vtMissing, adExecuteNoRecords);
The commented out bit is how I tried it with a command, which gives the afore mentioned error. I've tried all sorts of permutations, with and without the ;, simplified down so the only thing I enter is the primary key, and it always gives an invalid character error. Every thing I have tried, if streamed to a file, works right away in SQL+. The stored procedure hangs indefinately, and it looks like this:
(QFileID IN tblAttachmentVersions.qfileid%TYPE,
DataID IN tblAttachmentVersions.RevisionCount%TYPE,
Filename IN tblAttachmentVersions.filename%TYPE,
MimeType IN tblAttachmentVersions.mimetype%TYPE)
IS
BEGIN
INSERT INTO tblAttachmentVersions
(QFileid, RevisionCount, binaryData, filename, mimetype)
VALUES
(QFileID , DataID , empty_blob(), Filename , MimeType);
END;
Thanks for the help.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
How do I create a command button that brings up a menu like the windows start button? I have been trying to do this for some time now with no success.
|
|
|
|
|
When the button is clicked, use the TrackPopupMenu API to make the menu that you want to appear. This is the same function that you use if you want to create a right-click or context menu.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I've written a Win32 Dialog App that calls CreateDialog instead of CreateWindow. When it starts up I wanted to use FindWindow along with a class name to see if the app was already running. To do this I need a unique ClassName, but the class is created by the call to CreateDialog.
I have tried using the CLASS statement in the resource file, but then the call to CreateDialog fails.
The API documentation for DefDialogProc hints that RegisterClass can be used to set the ClassName for a Dialog. It further states that GetClassName can be used to get the WNDCLASS for a dialog, then the name can be changed and a new class registered.
I think this is standard Win32 stuff, but in case it matters, I'm working with WinCE.
Has anyone ever done this? Nothing works as expected for me. Is a different approach called for? Suggestions? Comments?
Brad Manske
|
|
|
|
|
A better way to limit multiple instances of the app is to create a named mutex. Only one app will be able to do this at a time. If the mutex already exists then you can assume that your program is alreay running, the same way you would if the window was already found.
There are some gotchas to both methods so look at this article.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
While your solution will work,I have one additional requirement that I left unstated.
Once you know that an instance of the app is running, it needs to be brought to the front of the Z-order before the current instance exits. FindWindow returns a handle to the window that you can use to do this.
FindWindow can also search by window Title and this is the solution I may go with but then you have the limitation of not being able to change the window text which is often done on the main window to convey info like the name of the open file.
Can you add any other thoughts? I'm writing this for an article for CodeProject and this has nothing to do with the main topic but I would like to make it clean before submitting it.
Brad Manske
|
|
|
|
|
I have an ActiveX control written using VC++ which is used to process a data file to generate a desired output.
This processing can sometimes takes a very long time, and I want to be able to cancel the processing part of the way through if I wish.
What is the best way to do this?
Cheers
|
|
|
|
|
You will need to have a second thread send a message or set a variable on the thread that has the long process. The thread that is running the long process should periodically check for the message to stop or check the variable that indicates that it should stop.
A good type of variable to use would be an Event. These can be given names and shared across processes if that is what your ActiveX control needs to do.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi,
PLEASE help!!! I am almost finished with this card game that I'm making, but after I had made a minor change I got a weird error that I can't make go away:
CVTRES : fatal error CVT1103: cannot read file
.\Debug\Pyramids.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Error executing link.exe.
What can I do? Thank you SO much for your help,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|