|
Oh.....i understand that now......let me try....
Thanks, Tomaxz.......
THANK YOU THANK YOU THANK YOU!!!!!;P
|
|
|
|
|
I'm working on an application that talks to a device connected through the serial port. Is there anyone who has done this before and is willing to let me use their code as a reference?
Thanks.
- John
- johnu@emersonprocess.com
|
|
|
|
|
Take a look at this:
http://msdn.microsoft.com/library/default.asp?URL=/library/wcedoc/wcecomm/serial_8.htm
In the "PortReadThread (LPVOID lpvoid)" function they specify a set of events to be monitored for the port, then re-specify them inside the while loops. Is this necessary, and why is it done?
?!?
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'
Thanks.
- John
- johnu@emersonprocess.com
|
|
|
|
|
ONE approach is using the ActiveX component 'MSComm'. I'm helping somebody else through this component the last couple of weeks, so just search this forum on MSCOMM and you will find some tips and hints...
If you find out a better way of talking to the serial port (or rather, a modem behind it!), please let me know!
Structured programming vs. chaotic mind boggling
|
|
|
|
|
Hi !
Where can I found a source code for an Identify Structure file format ?
I need a function for detect file formats, like: EXE (PE Win32), EXE (DOS), COM, TXT, etc... not check the extension... but, check the internal file format.
IdentifyStructure( char * cFile, char * cReturnFileType )
Thanks
|
|
|
|
|
www.wotsit.org
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Hi !
I know this website...
But I need a ready source code...
Thanks
|
|
|
|
|
In unix/linux, a utility called "file" allows you to do just this. It is gpl'ed so you will be able to get the source somewhere. Dunno where though. look about for it.
|
|
|
|
|
|
Thanks
I´m test this program now...
I send the result to here...
Thanks
|
|
|
|
|
I think, open a file in binary mode and check the header for the type of that file. The formats can be obtained from sites like http://www.wotsit.org/
It must work.
|
|
|
|
|
How can I check, if the CD-Tray is open?
Normally I have to send a mciSendCommand with MCI_STATUS / MCI_STATUS_PARMS, but that won't work. Does anyone have an idea?
I have to use this with MCI_SET_DOOR_OPEN / MCI_SET_DOOR_CLOSED.
Thanks for support!
Dirk
|
|
|
|
|
Hi All !
Please help answering this question who is able to
62. You are using Visual C++ to create a component that will provide information to several different client applications Some of these applications have higher priority than others, and your component must prioritize requests for information.
How should you develop your component?
A. Develop your component to use HTTP to return information to client applications.
Use a persistent property in the HTTP request to set priority.
Pass information to client applications in order of priority
B. Develop your component as an ActiveX user interface control.
Add a Priority property to the control.
Pass information to the client applications in order of priority.
C. Develop your component as an in-process COM server component that accepts a reference to a notification object from each client application.
Add a Priority property to this object.
Use asynchronous callbacks to pass information back to the client applications in order of priority
D. Develop your component as an out-of-process COM server component that accepts a reference to a notification object from each client application.
Add a Priority property to this object.
Use asynchronous callbacks to pass information back to the client applications in order of priority.
Thanks.
|
|
|
|
|
in mfc what is the correct way to access files... before i have used something like:
ifstream myStream("c:\test.txt");
if ( myStream.fail() ) {
MessageBox("Failed!");
}
else {
MessageBox("Opened!");
}
but i cant get this to work.... should i be doing something different?
thanks
|
|
|
|
|
I am not sure how to do this in MFC, but I *think* you need to modify what you posted in order to use fstream.
Try....
ifstream myStream;
myStream.open("c:\test.txt");
if ( myStream.fail() )
{
MessageBox("Failed!");
}
else
{
MessageBox("Opened!");
}
- John
- johnu@emersonprocess.com
|
|
|
|
|
|
Hi, how can I play sound on the internal PC speaker?
Like an sweep up od down, or anything else...
It ist possible, because if you know WinAce 2.0 : When you extract an large ace-file and the extraction is complete the pc-speeaker goes "dililililip"
So how can I do so?
Thankz
Ken
|
|
|
|
|
> the pc-speeaker goes "dililililip"
They probably are using the Beep API function. It takes the frequency and duration as params.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
maybe, but this only works on Win2k /NT...
ther must be a basic (C language or so... a MSDOS working function) way to play sound on speaker...
Any idea?
Ben
|
|
|
|
|
How make to exit or modify a no-static variable inside a static CallBack function MidiInProc(declared in mmsystem.h)when i receive MIM_DATA MIDI Message. i define my static callback inside a class and called in midiInOpen.. Please help me
|
|
|
|
|
hi all,
could anyone tell me the character and the use of "static member function" in a class? i found that AfxBeginThread() need to pass only a static function in the new thread? any reason for that?
thanks,
jim
|
|
|
|
|
We had an interesting dicussion on this a while back - type 'casting thread' into the keyword filter box to locate.
This should be in the FAQ
|
|
|
|
|
hi Tim,
i can't locate and message with 'casting thread'... could you check this out for me?
regards,
jim
|
|
|
|
|
I think its here
Basically, member functions have an extra param tacked on - the this pointer - which means they can't match the callback's signature - static members don't have this problem, but can't access non-static member vars - the other thread has the whole story, and more!
|
|
|
|
|
I am using Dundas HyperView Studio ActiveX forms in an application. The forms work very well except for one problem I have encountered which is causing my customers (and me) quite a headache.
Just for reference: The application is an MFC MDI application using StingRay Objective Toolkit and Dundas HyperView studio together. I am using VC 6.0 Enterprise edition w/SP 5. The problem occurs on Win95, 98 and 2000. I have not tested it on NT or ME.
I have a a document which has a split frame with 2 sections (top and bottom). On the top frame I have a view in which I create (at run-time) a tab control. Each tab on this control corresponds to a different modeless dialog which is created on-demand. Presently there are 3 tabs. 2 are simple VC dialog resources displayed as modeless dialogs. The 3rd is a VC resource modeless dialog with a Dundas HyperView form created on it.
Everthing works fine except if the hyperview form is displayed and the user minimizes the app or ALT+TABs out, the user cannot ALT+TAB back or simply click the icon on the task bar. The only way to get back is to R-Click on the task bar and choose "Restore". This only happens with the hyperview forms, not the other modeless dialogs displayed.
If anyone has any experience with this problem, please respond.
Thanks in advance.
|
|
|
|