|
I am not sure you are making the right use of this "feature".
There's a difference between be able to allocate a TOTAL of more than 2GB, and be able to allocate a single block of more than 2GB.
The use of the VirtualAlloc API is subordonated to the use of the /PAE flag, not /3GB. There is no special API to use along with /3GB, since it just orders the system to leave under 1GB instead of 2.
The book "windows 2000 programming" explains how to use it. I guess that if you are doing this in a real world case, then you certainly can have more direct MS support for that topic.
Besides that, have you more than 2GB free disk space available (configured disk swapping) ?
How low can you go ? (MS retrofuck)
|
|
|
|
|
Thank you for replying.
I also suspect that VirtualAlloc API might not be able to allocate a single block of more than 2GB. Can we play around with /PAE flag to make it allocate more memory?
Do you mean that the book "Windows 2000 Programming" gives some method on how we can allocate a block of more than 2GB? Who is the author of the book? I need the memory for a Finite Element Analysis software.
I do have more than 2GB free disk space available.
|
|
|
|
|
tsk wrote:
I also suspect that VirtualAlloc API might not be able to allocate a single block of more than 2GB
That's what I have told you. You can allocate the amount of memory you want per process (with a limit of 3GB with /3GB and up to 64GB with /PAE) by chunks, not by a single call.
How this works is explained in the book mentioned. It's from MSPRESS[^].
Never forget Windows is a 32-bit OS, thus cannot address pointers more than 4GB large. And because the kernel takes 2GB of these addresses (without /3GB), that's why you have at most 2GB per process. A lot of problems here because the most significant bit of pointers is 1 and becomes negative (comparisons may fail).
To break the 4GB barrier, Windows, through VirtualAlloc and the /PAE allows you to use pages of memory (with is an old technique). Of course, this constraints the whole design of your program.
tsk wrote:
how we can allocate a block of more than 2GB?
Although that's unlikely, you'll need a horsepower OS, such like MS datacenter (with 4GB or 16GB of physical memory on-board) : again, if you are in a real world case, your company should by this time already be in contact with MS reps.
How low can you go ? (enculage MS)
|
|
|
|
|
Thanks Stephane Rodriguez. I might need to use other alternative such as divide and conquer to solve the equations.
Contact MS reps for what?
|
|
|
|
|
Hi,
I'm running Ms Word Automated... meanwhile I do a lengthy
operation I show an "Please Wait" window..., but the user can click on word and mess up the document ( ).
What I'm thinking... what happens if I set the parent of my "Please Wait" window as the window handle of the WinWord instance ?, Is that possible ? Could block the message pump of Ms Word ?
Thanks in advance, greetings
Braulio
|
|
|
|
|
I'd try to disable main MS Word window using Word's automation model. I don't have the reference at hand, but I believe there should be some property or method for that.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
There are two alternatives: IIRC, Word automation has an option for hiding the interface.
The other works only in WinNT/2k/XP but serves to any program, is using CreateDesktop to create a second, hidden desktop and opening the program there.
Q261186 - Computer Randomly Plays Classical Music
|
|
|
|
|
Application.Visible = True/False
How low can you go ? (MS retrofuck)
|
|
|
|
|
Thanks but...
Mmmm... I would rather preffer something like "Disable" = TRUE...
Thanks, greetings
Braulio
|
|
|
|
|
IOCompletion ports aren't supported under win9x. winsock supports iocompletion functinality. the documentaition doesn't mention anything of incompatibility. Does anyone know if it's possible to use it under win9x?
|
|
|
|
|
|
[Click for User Profile] Li Zhaoming 8:10 20 Oct '02
Dear Buddies,
I always wondering that:
1) If I want to hide the "help" button in "Customize Toolbar" dialogbox, I should response the TBN_INITCUSTOMIZE notification and return TBNRF_HIDEHELP.
However, TBNRF_HIDEHELP is never defined when compiled.
2) If I want to display a "Chevron" in a Rebar control, I should create the Rebar control with RBBS_USECHEVRON style.
Howerve, RBBS_USECHEVRON is never defined either.
Anything wrong? Is that because the version of SDK? Has the newest version SDK defined these two constans?
Thanks!
|
|
|
|
|
I wrote ADO classes in MFC DLL and exported an function in whitch these classes are used. then call this function in my Exe files and got the following.
help me plz, quickly!!
c:\dark blue\class import\backup 02\backup\hydrosrv\formattable.h(16) : error C2504: 'CRecordset' : base class undefined
Extreme programming. Do the No.1
|
|
|
|
|
"base class undefined" means that the base class has been declared somwhere like this:
class CBaseClass;
This is for having pointers to the declared class as members, without need to include the class in the header. (The header for CBaseClass is included in the cpp file)
this is no good for derivation. you must #include the header where the base class is declared in the class' header.
I noticed how unclear this might seem at first look (sorry bad English) complain to me if appropriate.
|
|
|
|
|
Can anyone please explain how to use a tab control in a dialog bar.
your help would be appreciated
thankyou
steven oliver
|
|
|
|
|
I'm playing around with the VSS object model and have found a couple of samples on MSDN and the web. However I can't seem to find any documentation for all the interfaces and methods.
At the moment I'm after the parameter specs for GetVSSItem. Anybody got any good links to VSS COM object model documentation.
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
MSDN here[^].
To get it in your local MSDN doc, you must check the VSS box at install-time.
How low can you go ? (MS retrofuck)
|
|
|
|
|
Thanks.
That'll teach me to search for functions by their C++ names and not by their VB versions. Doh.
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
How to create the window without maximize button or with maximize button disbaled.
|
|
|
|
|
Remove the WS_MAXIMIZEBOX style.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
I am running the vc program from vbprogram using createprocess.My window name is form1.When i click the button on the form1,i am starting my vc program exe.Once when i start the exe,i tried to disable my vb program taskbar name using
HWND DisWnd=FindWindow("Shell_TrayWnd","Form1");
EnableWindow(DisWnd,FALSE);
But it didnt worked out.
|
|
|
|
|
This doesn't work.
You have two possibilities:
1. Inside your VB program, right after you call the VC app you modify the style of your VB app to have the WS_EX_TOOLWINDOW . This will make the taskbar button disappear.
2. Use ITaskbarList::DeleteTab(HWND hWnd) to remove the taskbar button from the taskbar. hWnd is the handle to your form1.
hope this helps
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I'm somewhat confused.
When is the FD_READ message sent?
when our supplied buffer is filled, or when the client has sent() or when the tcp-window is filled, or when the package has arrived, or when the message has arrived.
any clearing of this would make me grateful.
After reading several articles on socket programming, this is still unclear, so I guess that complete knowledge of this matter is relatively rare.
|
|
|
|
|
An excellent reference for winsock questions is Bob Quinn's "Windows Sockets Network Programming" (http://www.sockets.com/) and the winsock2 mailing list (http://www.winsock2online.org/).
The books says to FD_READ:
occurs in the socket state 'readable': data received by the the network system is ready for application to read
when our supplied buffer is filled ? NO
when the client has sent ? YES, that is the minimal requirement that the target socket can get into the 'readable' state
when the tcp-window is filled ? YES, maybe, of course it can be not the last tcp-window of the tcp buffer
when the package has arrived ? YES, maybe
when the message has arrived ? YES! (if you mean the windows message from WSAAsyncSelect or select; it's also correct when you mean with message the whole data block the client socket has sent to the receiving socket in readable state)
A select'ed or WSAAsyncSelect'ed socket receives FD_READ when it is in readable state and a following recv() on that socket will succeed. That means that is garantueed that data can be received (please notice, this can also data of length 0)
|
|
|
|
|
Hi,
Can someone please point me to a good tutorials about driver development
including examples?
Kind regards
Eran
|
|
|
|