Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. chigley

    Nested structures

    I havent managed to find any way of connecting a debugger to gcc (MingW) yet. Can anyone suggest a link? Charlie Benger-Stevenson Hart Hill IT Ltd www.harthill-it.co.uk
  2. chigley

    Nested structures

    The memory is getting corrupted somehow. I have some debug code printf("rule.ipAddress FOR PROGRAM %s = %s \n",programs[0].name,programs[0].firewallRules[0]->ipAddress); When I execute this right after the rules have been added, it is fine. When I execute this later in the program (like...
  3. chigley

    How to get the handle of a jpg image object

    There might be a solution in unmanaged code that we can put together but I need to know a bit more about what you are trying to do. It is possible to open the image, and get a handle to the device context but what are you doing with this dll? Are you writing a dll? What is the handle to? A...
  4. chigley

    Nested structures

    None of the above. Although the 15 chars + \0 is a good spot. Need to declare the nested array as FirewallRules ** firewallRules; This I think is that the parent structure cannot have dynamically allocated memory structures in it, rather you need a pointer to the array. Seems to work. Any...
  5. chigley

    Nested structures

    Hi, I wonder if anyone can help me. I have the following structures defined typedef struct _FirewallRule FirewallRule; struct _FirewallRule{ char dnsValue[1024]; char ipAddress[14]; //xxx.xxx.xxx.xxx - 15 chars int protocol; char user [255]; char group [255]; int action; int...
  6. chigley

    Program using realloc on global variable

    Great answer. Things to try, so I am not feeling as stranded. Thanks for your suggestions. Charlie Benger-Stevenson Hart Hill IT Ltd www.harthill-it.co.uk
  7. chigley

    Program using realloc on global variable

    Hi, I have a struct which is defined in a header file (firewallrules.h) thus typedef struct _FirewallRule FirewallRule; struct _FirewallRule{ char * dnsValue; char * ipAddress; int protocol; char * user; char * group; int action; int ruleStatus; }; typedef struct _Program...
  8. chigley

    String slicing

    Hi, I have an array of structs, comprising the name of an application and the path struct{ char name[50]; char path[1024]; } I am trying to write a function to search this and build a sub set based on the search string. Eg, If the search string is "Fi" Then it would match from the left hand...
  9. chigley

    RegQueryValueEx driving me mad

    I am thick. Opening the wrong key, should open lpSubSubKey not lpSubKey. Can anyone show me how to scoop the data out of the buffer and into a char array? Ultimately want to return an array of strings (char arrays) of the installed programs. Charlie Benger-Stevenson Hart Hill IT Ltd...
  10. chigley

    RegQueryValueEx driving me mad

    Trying to write a function to return an array of installed apps by querying the registry. Nearly there, opening all the enumerated sub keys, but when I try and read the value (reg_sz) it returns error code 2 - not found. Seeing as the value does exist it is driving me a bit mad. Code is here...
  11. chigley

    Wrapping text in a div

    I have googled this to death and got nowhere. It seems like such a common problem, and lots of advice but nothing works for me. Here is what I am trying to do. Two divs (inline) <div 1>---------------<div2> Some long * text that nicely * An image wraps inside its * nested div...
  12. chigley

    Missing header files

    Yep found it. Must have downloaded the wrong SDK? Not sure I did, but still. The latest one has the headers. There is a VC directory and they are all in there. Charlie Benger-Stevenson Hart Hill IT Ltd www.harthill-it.co.uk
  13. chigley

    Missing header files

    Hi ArkM, Thanks for the timely reply. My question is why is stdio.h not in the include directory of the sdk, essentially. It was my understanding that the platform SDK contains up to the minute header files. Since VC++ was released there have been many patches to the OS, and the SDK is a good...
  14. chigley

    Missing header files

    Hello, I want to do some development using the windows SDK. This is the closest forum I can find for my question. I have installed the latest SDK but when I add the include directory to my compiler it complains about unreferenced header files. Eg stdio.h Sure enough stdio.h is not in the...
  15. chigley

    Parse list of values

    OK so can I get one that works now? Charlie Benger-Stevenson Hart Hill IT Ltd www.harthill-it.co.uk
  16. chigley

    Strtok linker problem

    I do not have the answer. The above code does not work, nor does it do what I need and everyone seemed to be ignoring the point that strtok does not work for me, so posts such as "try strtok" lead me to think that maybe the one post with two distinct trains for thought may be too much for some...
  17. chigley

    Parse list of values

    Hi, If I have a char array of some values eg "80,8080,25,1433" etc And I want to parse this into an int array so that myIntArray[0] returns 80 myIntArray[1] returns 8080 etc and I don't want to use strtok, does anyone have any ideas on a simple solution? Charlie Benger-Stevenson Hart...
  18. chigley

    Strtok linker problem

    Can you read the original post? Strtok gives me an error in kernel mode. That is why I am either looking for an answer to while the code will not link, or an alternative method for parsing the values into an array of ints. Charlie Benger-Stevenson Hart Hill IT Ltd www.harthill-it.co.uk
  19. chigley

    Strtok linker problem

    I am writing a kernel mode driver for Windows Vista. I want to use the strtok function. When I compile I get LKN2019: unresolved external symbol __imp__strtok Is strtok compatible with this version of the DDK? I am using latest DDK. I have included string.h, and it compiles but won't link...
  20. chigley

    DDK Problem

    Not sure if this is the right place to post, but seems the closest I can find. I have compiled the "inspect" filter driver example from the latest Windows Driver Kit, and the instructions tell you to install it, and then run it from an elevated command prompt thus net start inspect Good in...

Part and Inventory Search

Back
Top