Click here to Skip to main content
15,916,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I know when CDialog is deleted by a destructor? Pin
Maximilien20-Nov-04 6:08
Maximilien20-Nov-04 6:08 
GeneralRe: How do I know when CDialog is deleted by a destructor? Pin
tip231020-Nov-04 6:20
tip231020-Nov-04 6:20 
GeneralRe: How do I know when CDialog is deleted by a destructor? Pin
Maximilien20-Nov-04 9:14
Maximilien20-Nov-04 9:14 
GeneralWIN Management WMI Service (64 bit env on IA-64) doesn't seem to load 32 bit dlls Pin
Member 39957420-Nov-04 3:28
Member 39957420-Nov-04 3:28 
GeneralRe: WIN Management WMI Service (64 bit env on IA-64) doesn't seem to load 32 bit dlls Pin
BaldwinMartin20-Nov-04 17:04
BaldwinMartin20-Nov-04 17:04 
GeneralRe: WIN Management WMI Service (64 bit env on IA-64) doesn't seem to load 32 bit dlls Pin
Member 39957420-Nov-04 19:49
Member 39957420-Nov-04 19:49 
GeneralRe: WIN Management WMI Service (64 bit env on IA-64) doesn't seem to load 32 bit dlls Pin
BaldwinMartin21-Nov-04 7:28
BaldwinMartin21-Nov-04 7:28 
GeneralRe: WIN Management WMI Service (64 bit env on IA-64) doesn't seem to load 32 bit dlls Pin
BaldwinMartin22-Nov-04 7:52
BaldwinMartin22-Nov-04 7:52 
Hello,
Yes, it is so, but there is a reserved area for such as this. Thunking is the problem. By default, 64-bit applications can use 8 TB of user mode address space.
As you know 16's and 32 will work fine as long as they are loaded under the 2GB level and a pointer is set to the same. Please think about the 16 and 32 bit thunker and look at it's doc's at m$. Notice that the thunker can only address x amount of memory as no one ever thought we would have more than a few megs. But, just because your system does not have more than 2 gigs mem-ram does not let you off the hook 8^}.

Please remember data is data, is data. just as you may load a text file into memory, you may load another resource into memory, right? You could open a dll in bin mode and read it yes?
Now come the problem of an insertion point, well the best I can explain this is search for it in your favorite bin editor. Next grab the offset and you golden.


Your must load absolutly, and create a pointer to the dll's and the offset, just as you would a thread to another exe or resource....that get's you the dll set to open, next in the dll header make a friend to the dll. Ole'(I name the dll something else, but that is another issue, see the idea thought?)

I have loaded 16's using this method and dllhelp. Now comes the problem of addressing the values in memory.Do not use the thunker. use your new pointer.
Write the data to the disk, and next go to M$ Please read and download the thunker compiler from M$ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win9x/tc_1582.asp

OK, a thunker compiler take a simple script that uses the reserved words below.
Now create a thunker that loads the newly formed file with the help of dllhelper.

Doh!, DO NOT DOWNLOAD A Thunker from the net as many are trojan's, go to M$
Keyword Meaning
enablemapdirect1632=true; Specifies a 16-bit to 32-bit thunk.
enablemapdirect3216=true; Specifies a 32-bit to 16-bit thunk.
input The parameter is used for input only; it is translated when the function is called.
output The parameter is used for output only; it is translated when the function returns.
inout The parameter is used for input and output; it is translated when the function is called and when it returns.
faulterrorcode Specifies the error code when a 16-bit to 32-bit thunk fails because the 32-bit DLL cannot load or initialize. This value is returned when the application calls the first thunk. For more information, see Late Loading.
preload32 Forces the 32-bit thunk DLL to load when the 16-bit thunk DLL is loaded in a 16-bit to 32-bit thunk.
preload16 Not used. Late loading of a 16-bit DLL in a 32-bit to 16-bit thunk is not supported.
win31compat Defers unloading a 32-bit thunk DLL until the process terminates. For more information, see Compatibility with Existing 16-bit DLLs.

You must ship the new thunk with your product.
M$ says: "Compatibility with Existing 16-Bit DLLs
There are certain steps you must take to ensure compatibility with existing 16-bit DLLs. Using the win31compat statement in the thunk script causes the unloading of a 32-bit DLL to be deferred until the containing process terminates. Use this statement to ensure that interprocess loading and freeing procedures, which may have worked with the 16-bit DLL when it was called from 16-bit code, will not cause the 32-bit thunk DLL to be freed prematurely. It also allows the 16-bit library to be freed without execution of the 32-bit DLL's notification routine an occurrence that could cause reentry into 16-bit code.

You must use the win31compat statement if a 16-bit DLL replaces a DLL that is currently used in a Windows version 3.1 environment or if the DLL runs as part of a graphics device interface (GDI) device driver. You might need use this statement even if your 16-bit DLL does not fit into one of these categories, because it provides extra protection from other DLLs that might be used by your thunk DLL."



The college where I teach part time has a very old accounting package that will only run on 3.1. I used this method to load the dll's and create new dll's from the old. Thanks M$ for another unlubed screw..g! Thunking is easy, entry points are tuff!

I will try to hack out an example over the winter and post an article.
This is bound to be a longhorn issue as M$ intends to stuff the box so full of mem-ram that it will be un-nesessary to write efficient code. (i.e. longhorn Noun: a stupid breed of cattle that are ofthen killed by lightning while standing under trees in thunder showers)).

"Naked we come and bruised we go."
- James Douglas Morrison

Best Wishes,
ez_way
Generalperfomance monitor object Counter log issue on Windows 2003(WMI) Pin
Member 39957420-Nov-04 3:24
Member 39957420-Nov-04 3:24 
GeneralRe: perfomance monitor object Counter log issue on Windows 2003(WMI) Pin
Member 39957420-Nov-04 20:18
Member 39957420-Nov-04 20:18 
Generalauthentificated smtp Pin
Spiritofamerica20-Nov-04 3:07
Spiritofamerica20-Nov-04 3:07 
GeneralRe: authentificated smtp Pin
Ravi Bhavnani20-Nov-04 6:20
professionalRavi Bhavnani20-Nov-04 6:20 
GeneralRe: authentificated smtp Pin
BaldwinMartin20-Nov-04 17:19
BaldwinMartin20-Nov-04 17:19 
GeneralC++ program to perform Binary Tree operations Pin
ftrbinom,oiunomin20-Nov-04 2:59
ftrbinom,oiunomin20-Nov-04 2:59 
GeneralRe: C++ program to perform Binary Tree operations Pin
JWood20-Nov-04 10:17
JWood20-Nov-04 10:17 
GeneralPlease Help:: CEdit Pin
TooLeeDiN20-Nov-04 0:05
TooLeeDiN20-Nov-04 0:05 
GeneralRe: Please Help:: CEdit Pin
Jack Puppy20-Nov-04 0:54
Jack Puppy20-Nov-04 0:54 
GeneralRe: Please Help:: CEdit Pin
Sujan Christo20-Nov-04 1:27
Sujan Christo20-Nov-04 1:27 
GeneralRe: Please Help:: CEdit Pin
TooLeeDiN20-Nov-04 5:17
TooLeeDiN20-Nov-04 5:17 
GeneralReverse Engenieering Software Pin
Filomela19-Nov-04 23:30
Filomela19-Nov-04 23:30 
GeneralRe: Reverse Engenieering Software Pin
qcha0s20-Nov-04 12:09
qcha0s20-Nov-04 12:09 
GeneralRe: Reverse Engenieering Software Pin
Kreatief21-Nov-04 21:00
Kreatief21-Nov-04 21:00 
GeneralRe: Reverse Engenieering Software Pin
qcha0s22-Nov-04 2:35
qcha0s22-Nov-04 2:35 
GeneralRe: Reverse Engenieering Software Pin
Henry miller22-Nov-04 3:09
Henry miller22-Nov-04 3:09 
GeneralRe: Reverse Engenieering Software Pin
Anonymous22-Nov-04 3:36
Anonymous22-Nov-04 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.