|
It's just a dll, so my guess would be that it's fine. BUT Microsoft don't support Windows 9x anymore, so if it doesn't work, you're on your own.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hello, i was wondering if it is possible to to convert a DWORD _stdcall to a void pointer-to-function?
-Ryan M.
|
|
|
|
|
<font style="color:blue;">typedef long int </font>DWORD;
there is no pointer in that expression, and less "pointer-to-funtion"... what do you mean ?
TOXCCT >>> GEII power
|
|
|
|
|
sorry, i didn't see the _stdcall.
use :
<font style="color:blue;">reinterpret_cast</font><<font style="color:blue;">void</font>>(your_expression)
even if i don't imagine my you'd need such...
could you help me ?
TOXCCT >>> GEII power
|
|
|
|
|
In general no.
The reason is that when you cast things such as this, you run a great risk of changing the calling convention and thus trashing your stack.
However, there are a few cases where this works. But in general, it is very bad idea.
Why would you want to do this?
(The reason I ask is because 9 times out of 10, when someone asks this question it is because they can't get their code to compile because they aren't doing something right.)
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
There once was an article by Shaun Miller titled "Generating and Deploying Debug Symbols with Microsoft Visual C++ 6.0" that described how to generate executables and debug symbols that could be transferred to another machine for debugging. As with all things Microsoft, sometimes it worked and sometimes it didn't. At least when it didn't, a message box usually gave some indication of what it thought the problem was: it couldn't locate the PDB file, it couldn't locate information for the module in the PDB file, etc.
The information in that article doesn't apply to .NET. Here is the email that I received from MSDN Online when I contacted them about problems debugging on a system other than the one used to build:
>>Hello,
>>
>>Thank you for your patience in waiting for our reply.
>>The topic in question is not intended to work with Visual Studio .NET;
>>as in the title, it is specific to Visual C++ 6.0.
>>Hope this clears up the issue. Thanks again!
>>Liezel
>>MSDN
>>http://msdn.microsoft.com/
(It should have added: "P.S. F--k you!)
VC++ .NET doesn't believe in messages. The developer is given as little information as possible. Instead of a message box, attempting to set a breakpoint simply displays the familiar red dot with an oh-so-cute question mark in it. Tracing into the function displays assembly code. The context menu has "Go to source" grayed out. No explanation. No message. No help. No option. F--k you.
The DLL and its PDB file were built together on a different system than the one used to debug (this is a necessity when you develop systems with many different configurations of hardware that control physical devices such as lights, cameras, moving parts, etc.) The DLL and its PDB file are in the same folder on the system used to debug. Other DLLs and their PDB files are in the folder with the problem one, yet they don't exhibit the problem.
How does one generate and deploy C++ .NET executables and associated debug symbols to another system? How does one determine the source of the problem when a breakpoint displays a question mark or the "Go to source" menu item is grayed out?
|
|
|
|
|
Hello.Can anybody explain to me how can obtain the names of imported functions in a process if the originalfirstthunk is set to zero? .If can put an example, better.Thanks all;)
|
|
|
|
|
I wonder if anyone can help about a very general question that I have about parsing.
I would like to know if anyone knows of any articales or techniques for an elegant parsing method where the parsing is based on a dynamic parsing template.
The type of parsing that I am interested in is one that does not involve the usual gramatical or precedent type of parse that you might find in a stack based or recusive descent parser.
I am looking for a parsing technique where it is possible to specify a template comprising the specification of ints, strings and or possibly a stack of keywords that may or may not be present, of which one might be default ... etc and that kind of thing.
As I say, my question is very broad as I do not have very much expertise in designing this type of parsing mechanism.
In short, the idea is that a number of different functions must be able to provide a text based argument, that can be parsed by a common parser for a specific ( but dynamic ) pattern.
Thanks in advance.
Anyone who may have any pointers or ideas of articales that might help, would be very much appreciated.
Best regards.
James
|
|
|
|
|
Probably you can try out Boost - Spirit. There is an introduction article for this in codeproject.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
|
Hi!.
I have an object, a big object, with many arrays of others object, so, I have problems when I serialize this object, because it seems that is not stored on disc completely.
There is a limit of size, of the object, to serialize?. That is, "more than xxx bytes are not possible to be stored in a single object".
'Cause I trace the serialization process, (both, store and load), and first, when the object is being stored, I see the values of the fields going to the CArchive object through the operator << :
<br />
if(ar.IsStoring)<br />
ar<<field1<<field2; <--- this line<br />
...<br />
And they are the right values.
But when I trace the same method, when I want to read from the file the object, the values that I see are allways 0.
<br />
...<br />
else<br />
ar>>field1>>field2; <-- this line<br />
...<br />
I can load a part of the object well, but other no.
All the data to serialize are of type long.
I don't know if the problem is when I try to save the data, (that it seems to be correct, 'cause there are not errors), or when I try to read the data, (that also it seems to be correct, but nevertheless is not it).Thank you.
|
|
|
|
|
Hi!
I think it's just a simple question, but I haven't found any code that helps me...
I like to download a file from the internet using the InternetConnect & HttpOpenRequest which works fine. My problem is, that I want to check if the file is newer than a specific date, and if not use a local file.
My first solution was to use some kind of "Only if newer" field in the HTTP header, but I haven't figured out how this works... So now I try to send the request, parse the headers from HttpQueryInfo() and check for the "Last-Modified: " line and parse it. Works fine - except that the whole file is transferred before I can check the date&time.
So I'll be glad if you have some code like
BOOL IsInternetFileNewerThan(CTime tmCompareTo);
Thanks + Ciao,
Alexander
|
|
|
|
|
I am trying to build an object oriented C++ program that does fractal image compression. I want to be sure to have a "class-based" organization for example a class called Image and a subclass called CompressedImage with appropriated member functions etc. I was wondering if anyone has source code of a similar program.
|
|
|
|
|
hello all,
how shall i do serialize from dialogs?. and how shall i use them?.
ComputerNewton
|
|
|
|
|
Clickety[^]
God is Real, unless declared Integer.
|
|
|
|
|
I have a modeless property sheet containing three property pages. In one of the property pages, i want to create a pushbutton that brings up a modal dialog.
This will be no problem if the propert sheet is not modeless. For some reasons, DoModal won't work for modeless property sheet.
Has anyone run into similar problems? please help~
|
|
|
|
|
kimiko wrote:
For some reasons, DoModal won't work for modeless property sheet.
Define "won't work."
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
"won't work" as the dialog box won't come up and the application freezes.
|
|
|
|
|
Have you tried running it in debug mode with F5 to see if any assertions get fired? What happens if you step through the DoModal() method to see if/when it fails?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I looked into the implementation of DoModal() and found the application is stuck at CreateDlgIndirect(). Since this issue doesn't happen in Modal Property Sheet, I compared the input parameters of GrecateDlgIndirect from both cases.
Let's say I'm have the following code:
MySubWindow.DoModal() in MyPage1's button1 event handler;
Here is what I found:
When the PropertySheet is model, the pParentWnd of MySubWindow is the PropertySheet.
When the PropertySheet is modeless, the pParentWnd of MySubWindow is the Main Dialog (This program is a dialog-based application.)
Problem seems to reside on pParentWnd. How do I change my MySubWindow's pParentWnd? I tried to call MySubWindow.SetParent() before MySubWindow.DoModal(), but the program then gets stuck at SetParent function.
|
|
|
|
|
Are you providing the propertysheet as the parent of the modal dialog box??
God is Real, unless declared Integer.
|
|
|
|
|
I tried, but it didn't help. Maybe I didn't do it right. Anyway, what I did was in the event handler function, I had the following code:
c_MyDialog.SetParent((HWND)*AfxGetMainWnd());
c_MyDialog.DoModal();
Note: AfxMessageBox() doesn't function either.
|
|
|
|
|
Properysheet is not your mainwindow... so passing that is not rite...
try putting "this" in place of AfxGetMainWnd()
God is Real, unless declared Integer.
|
|
|
|
|
In my program, the pushbutton I want to use to bring a modal dialog box is on the property page not on the property sheet, "this" will be a pointer to the propertypage not the property sheet. I know I can do this->GetParent() which will return a pointer to the propertysheet, but there is another problem. When I do the following:
MySubWindow.SetParent(this->GetParent());
MySubWindow.doModal();
I get an access violation writing location 0x00434cc4 at MySubWindow.SetParent().
What is the right way of specifying the parent window of MySubWindow class?
|
|
|
|
|
kimiko wrote:
MySubWindow.SetParent(this->GetParent());
MySubWindow.doModal();
yes this will not work, as the window has not been created yet when you called SetParent so its giveing the exception.
pass the parent to the modal dialog box in the constructor.
God is Real, unless declared Integer.
|
|
|
|