|
thank you my code is runnig now i just change it to control and use getwindowtext.
thank you very much
neil
|
|
|
|
|
Hi all,
I know global variables are bad. I'm trying to write my first game. Its like tetris where you have different shapes. I have a linked list of shapes. Where am I supposed to declare this list in a Win32 app?
I thought the best place would be in the LRESULT CALLBACK WndProc under the switch(msg) case WM_CREATE. However, I'm getting some errors doing that (some error about the initialization being skipped by some case labels).
I cant declare the list in WinMain because I need to use it in LRESULT CALLBACK to modify its content...
Currently, I have my list declared as a global variable and it works well like that. I'm trying to understand what the alternative is (trying to develop good coding habits).
|
|
|
|
|
You can declare it in the WndProc function but outside the switch statement.
And you must declare the variable as static.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
vietnam09
Hi!
make OS
I not use MS-DOS
HDD have partitions:C:\,D:\,E:\
Question:How to :boot into partittion D:\ not Format all data(User select disk action boot as Win XP FAT 32)-NASM
kernel:
How to:FAT32 disk manager in my kernel
how to write PathCopy for boot.exe to CD-ROM as XP(not live CD,iso)
Please,full code not book,guide
THANKS
|
|
|
|
|
|
What do you mean by your question? please restate it.
|
|
|
|
|
frm:tuan1111
THANKS.
but I don't know,what is this ?
Please,better.
Answer Boot Question
By code
vietnam09
THANKS.
|
|
|
|
|
true
I want to write OS.
If I haven't MS-DOS then not use "int 21h"
How to create "int 21h"(not MS-DOS")
U have code:MS-DOS with TASM,Turbo C 3.0
-----------------------------------------------
NASM2 is free download
NASm2 != TASM ?NASM_begin.pdf where
VC6,gcc free
what is gcc ?It is DJGPP & 32 bit compiler.Link download .
If I write 32 bit boot with NASM2...how to mixing NASM with turbo C 3.0,gcc(32 bit kernel) ?
I want to:
in kernel.asm,mixing NASM with gcc|TC (32 bit)
in ker_mix.c,I write:
//descsript:create print Day Function
char input;
void main(){
cout << Action << endl;
cin >> input;
if(input=='Day'){
;print now date,month,time
}
then mix .c(32 bit) with kernel.asm
How to do it
-----------------------------------------------------
End,I have VGA-screen: 16M memory.
It view *.mp4,bitmap file(> 256 color) & run screensaver 3d.All color normal...beatiful
But I write VGA_Bitmap.c with TC 3.0 then result display bitmap bad
why ?
sReason:menory 16M or........
who edit VGA_bitmap.c(gcc)->Result:beautiful color,normal
THANKS
vietnam09
BY:TUAN1111--
|
|
|
|
|
|
tuan1111 wrote: How to create "int 21h"(not MS-DOS")
Google "freedos" for an example of how to accomplished this.
tuan1111 wrote: what is gcc ?
GCC is the GNU compiler collection (DJGPP is a port of GCC to MS-DOS). It is used to build the Linux kernel (and many applications as well) so it should meet all of your needs. There are several packages available for Windows which include GCC such as MinGW. See http://gcc.gnu.org/[^] for more information about GCC.
tuan1111 wrote: how to mixing NASM with turbo C 3.0,gcc
In your makefile specify the output type (COFF, ELF, etc.) when invoking NASM.
I do believe that most of what you are asking is probably way outside the scope of this forum. This includes your other post as well. You might however want to take a look at Developing a 32 Bit Operating System[^] on how one developer approached this.
modified on Saturday, August 1, 2009 8:16 AM
|
|
|
|
|
|
Is there a way I can check to see if I have exceeded array bounds in C++ using Visual Studio 2008?
|
|
|
|
|
It depends what you're looking for. There is a compiler switch for buffer overrun checking: /GS
You could also use guard pages to trigger an exception if you write past the end of a buffer/array.
But there is nothing that will neatly throw an exception if you write outside of an array.
|
|
|
|
|
I really appreciate the advice
|
|
|
|
|
You could use something like the _countof Macro[^] if your using a static array. It is defined as:
#define countof( array ) ( sizeof( array )/sizeof( array[0] ) )
Best Wishes,
-David Delaune
|
|
|
|
|
|
If you're willing to spring for BoundsChecker, you can use it to check your program.
|
|
|
|
|
|
Search abilities of the forum become worse and worse, I can not find my recent posts anyway.
If I input user name for searching, results list all posts from ancient year and can not sort them descendingly.
If input keywords, result says "no answer" but posts are just there!
many problems!
|
|
|
|
|
Perhaps the Site Bugs/Suggestion forum is what you are looking for.
|
|
|
|
|
I have a resource leak that I have thus far been unable to track down. I am using Process Explorer and Task Manager and am monitoring every counter that they are able to monitor. All counters are stable, ie there are no memory leaks, handle leaks, etc that I can detect. However, after my program has run for an hour or so all applications and Windows start giving a whole range of errors, but all of them are related to lack of resources.
The only thing so far that is interesting is the Virtual Size value in Process Explorer. It stands at about 1,2GB, while my process's Working Set and Private Bytes is less than 70MB. All other resources are 100% stable after my application started up.
I have enable Microsoft Application Verifier and set GFLAGS to enable all the Heap functions for my process. Alas, no errors. I've also tried Memory Validator, but it gives 100's of errors of uninitialized variables, all in MS code, nothing else really that matters.
Are there other utilities that will enable me to track the actual resource that is leaking ? Any other suggestions maybe as to what type of "undetectable" leak I am experiencing ?
Thanks
OD
modified on Friday, July 31, 2009 3:47 PM
|
|
|
|
|
A bit more description would be more helpful but not as much as debugging the code, especially places that work with buffers ( strings etc) system managed handles (GDI objects, Global memory etc).
Also:
od@ananzi.co.za wrote: all in MS code, nothing else really that matters.
It is very possible that YOUR code uses win32 APIs incorrectly causing one of any number of possible leaks.
|
|
|
|
|
I agree with RomanMzh in that it sounds like a GDI resource leak. You can use the task manager to see how many GDI objects your application is using. This MSDN Magazine article should give you enough information to track it down.
Resource Leaks: Detecting, Locating, and Repairing Your Leaky GDI Code[^]
Essentially all you need to do is select the 'GDI Objects' checkbox in the select columns dialog. I would recommend selecting 'Handle Count' as well. If either your GDI objects or handle count continues to increment... you may have a leak.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi Guys, I've managed to track down the "leak". The application uses a mailslot to send some frequent statistical data to another process for display. The receiving program was receiving the data a lot slower than the sender was transmitting it, so eventually the Mailslot IPC ran out of shared memory and from there all the problems started.
|
|
|
|
|
Hi,
I want to scale and rotate a bitmap (loaded using GDI+) and save the rotated and scaled bitmap to a file using GDI+.
How can I do it?
Thanks,
|
|
|
|