Search:

Type: Posts; User: pk68

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    3,384

    Use of LoadLibrary call

    I am using the following statement to load a dll in my code

    HINSTANCE hDLL = LoadLibrary(LibName);

    The library is being loaded and works as expected. My questions are

    1. What will happen if...
  2. Replies
    8
    Views
    6,571

    The problem is I don't know the members. All I...

    The problem is I don't know the members. All I know are the number of members and their data types and the datatypes are mixed within the structure.
  3. Replies
    8
    Views
    6,571

    I am sorry, I don't understand this. Is there a...

    I am sorry, I don't understand this. Is there a way to access the address of structure members so that I can use memcpy to update them.
  4. Replies
    8
    Views
    6,571

    Hello Bayint, I am writing a C program to load a...

    Hello Bayint,
    I am writing a C program to load a library(dll) and update certain values in the dll. I don’t have the source code of the dll. However the dll provides me the Structure, number of...
  5. Replies
    8
    Views
    6,571

    Help using memcpy to update structure members

    I am trying to update the members of a structure using memcpy and running into issues determining the indexes of the elements. here is an example



    struct AA{
    double a;
    double b;
    double...
  6. Replies
    10
    Views
    2,402

    Hi Whiteflags, Thanks for your continued...

    Hi Whiteflags,
    Thanks for your continued help. One of the things I noticed while reading more about vectors is the resize method. I have modified to use resize to increase the structure arrays...
  7. Replies
    10
    Views
    2,402

    My bad. I had to create an instance of AA. So I...

    My bad. I had to create an instance of AA. So I declared

    AA test;

    and then added the line

    load.push_back(test);

    Is this the correct way to code it. Now if I want to assign values to the...
  8. Replies
    10
    Views
    2,402

    That's what I thought. But it results in the...

    That's what I thought. But it results in the following error



    load.push_back(AA);

    test.cxx(139) : error C2275: 'AA' : illegal use of this type as an expression
    test.cxx(18) : see...
  9. Replies
    10
    Views
    2,402

    Thanks whiteflags. vectorload(5) is the...

    Thanks whiteflags. vector<AA>load(5) is the correct declaration. I fixed those errors and don't get the crash anymore. Now I want to increment the number of structures based on user input and not...
  10. Replies
    10
    Views
    2,402

    OK. I converted my function to use vectors....

    OK. I converted my function to use vectors. Following is how I changed the function



    struct AA
    {
    vector<int>grid_id;
    vector<double>lv_x;
    vector<double>lv_y;
    vector<double>lv_z;
  11. Replies
    10
    Views
    2,402

    I couldn't get vectors to work. I was running...

    I couldn't get vectors to work. I was running into following messages which I didn't understand. If someone can provide the syntax, I am more than willing to switch to vectors

    LINK : test.dll not...
  12. Replies
    10
    Views
    2,402

    Help assigning memory to structure arrays

    I need some help assigning memory to hold an array of structures with variable member arrays. Here is a part of the code



    typedef struct
    {
    double *t_stp;
    int *grid_id;
    double...
  13. I would appreciate if someone can provide the...

    I would appreciate if someone can provide the syntax to allocate memory to the structure and the structure members dynamically. I am new to C programming and struggling a little to get this going....
  14. It needs to be data[0].a =...

    It needs to be

    data[0].a = malloc(sizeof(double) * 10);
    data[0].b = malloc(sizeof(double) * 20);

    data[1].a = malloc(sizeof(double) * 20);
    data[1].b = malloc(sizeof(double) * 40);
    ....
    ....
  15. How to create array structure with memebers of different size

    All,
    I need some help creating an array of structure whose memory is allocated at run time. Also the structure has members whose size are different and again memory is allocated at run time. For...
Results 1 to 15 of 15