Regarding these resource files I know it is possible to store just about any type of binary data, but the problem is access. I am trying to include an Excel .xls file into my project. Including this as a plain file is no problem, but when added as a resource I have trouble accessing it. Namely with functions that expect a string pointer.
This xls file is the master template for which my program would copy/fill-in/manipulate. Therefore I would prefer it to be hardcoded into the exe where it would be pretty much impossible to be deleted or edited.
If I'm interpreting your situation correctly, you're saying you have an 'integer' identifier (defined in resource.h) for your Excel resource and need to know how to form the 'string' value that can be used to reference it.
To convert that integer value to a 'string' (wink, wink) Microsoft provides the MAKEINTRESOURCE[^] macro.
Is this what you are looking for?
Remember kids, we're trained professionals. Don't try this at home!
I want To Restart A remote Computer Running Server 2003,
Ip,Copmputer Name, Admin UserName And Password Are Known.
It Can Be Done Running Aprogram on Remote that Listens to
TCP/IP Packets carring Cusom Restart Message And Restart
Remote Compter Localy.
But I Search For A Mechanism That Not Required Additional Software On Remote,
Thanks a lot for Any Assistance.
I am a structural engineer and novice programmer. I am working on a project in which I have created 2 views, which can be selected from the menu. These work okay, but now the tool bar and status bar have dissapeared and I don't know how to get them back. Cab anyone help?
hi, im having a problem binding data to a crystal report. but actually i think the problem is caused by ADODB from which i get the data.
The problem is, when there are field names with an underscore,
ADO doesnt bind it. I use .csv files as data source and use MS VC++ 6.0.
How do i write the Column headers in the .csv file and the Schema.ini file so that ADO doesnt mind the wildcards?
I'm using access database (.mdb) using ADO classes. Anyone knows how to change comparing of strings in sql case sensitive ? (like select * from t where txt="aA"). I need it to be case sensitive only in some tables.
Thank you !
I'm currently trying to implement some data exchange using the WM_COPYDATA inter-process communication mechanism. Sending data from one application from one application to another works fine, but now they should communicate, i.e. the other application should answer the first application.
How can this be implemented? Just sending back data using WM_COPYDATA obviously cannot work: the first application sends data to the second window and blocks (SendMessage), the second one sends data to the first window and blocks, both block as the first window is also blocked. Unfortunately, PostMessage cannot be used with WM_COPYDATA, SendMessage must be used.
<hr><i><font face="arial" size="2"><code>_outp(0x64, 0xAD);</code>
<code>__asm mov al, 0xAD __asm out 0x64, al</code>
<small>do the same... but what do they do?? </small>
<small>(doesn't work on NT)</small></font></i>
Use SendMessageTimeout instead of SendMessage. Your app will not hang indefinitely if the other app does not respond. Also you could fire up a second thread to send the message from, that way only a subthread hangs not the entire app.
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Your message is not very clear (you don't explain what needs to be sent and where...).
But ok, maybe you are just interested in the part with the Thread. In fact, yes you are right. The thing you have to to is start a thread (CreateThread for example), and to this thread you can pass the handle of the window which needs to receive messages from your thread (when the process is finished). In your thread, you make a loop to send all your messages and when it's done, you send a owner defined message to your window message queue. So, in your main window, you know that data has been sent.
The use of a separate thread is there to allow the UI not to 'freeze' when you send all your messages.
I'm actually making a simulator that will receive a stream of bytes from a user-defined port, I've already stripped the message, decoded it and also managed to send the appropriate reply (stream of bytes back) through a seperate user-defined port.
Now the problem is that I don't know how to send my byte array through the port within a time window of 2250ms (Maximum) or terminate the transmission if the message is all sent before the 2250ms. I thought this is similar to the token ring network but they don't send within time windows.
Thanks alot for replying Cedric.
p.s. After I create a thread I make a loop in the thread the same way I make loops in functions? I'm totally new to this thread stuff..
Yes, a thread is simply a function that will be called in parallel with the rest of your program. So that means that if you lock something in your main thread; your second thread will continue to run independantly.
So, in your thread, you'll need to receive data and store them somewhere accessible from the rest of your program. But warning ! You need to secure your data to avoid both thread trying to access it at the 'same time'. Take a look at CriticalSections[^] for example.
Last Visit: 31-Dec-99 18:00 Last Update: 5-Oct-22 4:48