Need Help Understanding Some Syntax387 (6/25/2009 11:10:23 AM) comp.lang.c++.moderated I'm working on a port of qtcreator, and I ran across what looks like a pointer bug. Can someone help me better understand the what is being created by new in the following syntax? I'd also like to know how to... bwaichu
Fun with NASM structures1033 (3/21/2009 2:39:44 AM) comp.lang.asm.x86 So I continue to code up my PE editor, and I figured that using structures would be the best way to handle accessing parts of the PE header I have read into memory. Below I have the initialization of the PE Se... bwaichu
Need Help with a NASM Warning230 (2/9/2009 1:44:07 AM) comp.lang.asm.x86 When I assemble the below code, I receive this NASM error: string.asm:16: warning: section attributes ignored on redeclaration of section '.text' What am I doing wrong? The win32n.inc comes from: http://... bwaichu
TLS Callback Entry in Assembly (win32)348 (8/9/2008 2:28:23 AM) comp.lang.asm.x86 I'm working on the second file for a contest, and I'm struggling with the anti-debugging techniques used. In the second file for the contest, the file uses a tls callback to set PEB[2] to 2. Now, the value is... bwaichu
Alternatives to regex?136 (8/5/2008 1:39:06 AM) comp.unix.programmer Is there a library that people would recommend me use other than the one that comes with gnu gcc? I want to be able to efficiently use regular expressions against websites that I pull down to extract link urls... bwaichu
WndProc (stack clean up?)3123 (7/31/2008 1:02:04 AM) comp.lang.asm.x86 When using a window procedure, do I need to clean up the stack or will windows clean up the stack for me? Do I need the RET 16 or can I just RET? For example: WndProc: push ebp mov ebp, esp cmp ... bwaichu
Problem Linking (win32)1834 (7/22/2008 7:44:09 PM) comp.lang.asm.x86 Per another discussion here, I decided to switch to using the win32 object format via nasm -f win32, and I went with the golink linker. I was not able to find an app call alib to work with alink. However, I a... bwaichu
Problem with Function Call with NASM939 (7/21/2008 9:02:44 PM) comp.lang.asm.x86 For some reason, the AddFunc call below never happens. I walked through the code in ollydbg. Anybody know what I am doing wrong? extern MessageBoxA extern ExitProcess extern sprintf section .code code USE32... bwaichu
Proper Initialization of Pointer to Pointer1122 (2/8/2008 2:44:18 PM) comp.lang.c What is the proper way to initialize a pointer to a pointer? Say, I have a pointer: char *ptr and I need to pass it's pointer in a function: func(&ptr) What's the correct way to setup the pointer? Thanks,... bwaichu
Proper Initialization of Pointer to Pointer1122 (2/8/2008 2:44:18 PM) comp.lang.c What is the proper way to initialize a pointer to a pointer? Say, I have a pointer: char *ptr and I need to pass it's pointer in a function: func(&ptr) What's the correct way to setup the pointer? Thanks,... bwaichu(106)
Function Pointers #102524 (1/21/2008 12:10:10 AM) comp.lang.c I'm struggling with the concept of function pointers. I understand that a function pointer contains the memory address of the function. But I'm not sure how they are effectively used, and I'm not 100% sure on ... bwaichu(106)
Integer to "string" conversions1322 (9/30/2006 5:39:12 PM) comp.lang.c Now, I read the faq, and it suggests using sprintf. However, I want to all ways know where the integer finishes in the string. Basically, I want to: nbr | other data But the other data all ways has to start ... bwaichu(106)
Gray Code419 (9/27/2006 12:10:25 AM) comp.theory I am working my way through CRC32, and one implementation of CRC32 uses Gray coding or reflected coding. Actually, upon examination, it looks like openSSH uses Gray coding in it's CRC32 implementation. Where ... bwaichu(106)
more buffering925 (9/24/2006 12:21:53 AM) comp.lang.c I am writing a function that: 1) checks the size of the a non c string being copied against the available buffer space; len should not be large enough to contain a nul terminator (should I check for ... bwaichu(106)
File Transfers with zlib627 (9/19/2006 5:21:51 AM) comp.unix.programmer I am in the process of writing a simple file transfer program. I have successfully sent a file to netcat using this idiom: while ((size = read(file_no, buf, BUFSIZ)) != -1 && size != 0) { if ((write(sockfd,... bwaichu(106)
size_t in a struct2331 (9/17/2006 9:47:44 PM) comp.lang.c To avoid padding in structures, where is the best place to put size_t variables? According the faq question 2.12 (http://c-faq.com/struct/padding.html), it says: "If you're worried about wasted space, you can... bwaichu(106)
realloc()1230 (9/3/2006 5:20:38 PM) comp.lang.c Hi all, Wow, has it been a long time since I've been here. Too long. Anyway, I thing I have found the source of a segfault in my program, but I can't see anything wrong with this code (used to "push" a value... lark047(13)
Dynamically Allocated Multi-Dimensional Arrays624 (9/1/2006 11:34:28 PM) comp.lang.c Is my understanding of the allocation of these correct? I used fixed sized allocations for the example below, so I realize there is some optimization that can be done to those. I would like to use these in a ... bwaichu(106)