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 Wanet Telecoms Ltd 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

    ...want to disaply them) the memory is corrupt. That is to say, the parent structure is in tact, but the memory pointed to by FirewallRules ** firewallRules; has become corrupt. This is looking to all intents and purposes as corruption of the heap. So is this the correct way to store an...
  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

    ...action; int ruleStatus; }; typedef struct _Program Program; struct _Program{ int id; char path[1024]; char name[255]; FirewallRule * firewallRules; int firewallRulesCount; }; I have an array of Program structs, successfully populated, and the function for adding a program is...
  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

    ...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

    ...functions in C, and my googling efforts have been confusing at best. Here is the skeleton of the function void filterEnumeratedPrograms(char * searchString) { int i=0; int length=0; length = strlen(searchString); printf("Search string %s is %d characters long \n", searchString,length)...
  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

    ...int listApps() { LPCTSTR lpSubKey[1024]; LPCTSTR lpSubSubKey[1024]; HKEY hkResult=0; HKEY hkSubKey=0; char buff[1024]; // temp buffer char * valueName = "InstallLocation"; DWORD bufflen=sizeof(buff); DWORD count; DWORD type; int index; int retVal=0...
  11. chigley

    Wrapping text in a div

    ...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 * I have tried using word-wrap: break-word in the style of the div but this...
  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