SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Guest

    How do you define a pointer to an Array

    How do I go about doing the following:

    I have a Function which returns pointer to an array. How do I define that array because If I use Array of Long arMyList and then use it in the function like
    myFun(out array of string Array, Long xyz, long xyz)

    if I call myFun(arMyList,a,b) it gives me a runtime error: Erro divide by zero.

    It is a zero based array that I am going to get back from the function, function is an api call.



    ------------------

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do you define a pointer to an Array

    You cannot create a pointer to array and then use it in Silk. What you can do is have an external function return such a pointer and passed it to a PINTERFACE variable and then pass back the PINTERFACE variable in other functions. Since pointer are just integers you can do this kind of stuff but don't expect it to have the actual content of the original pointer.

    ------------------

  3. #3
    Guest

    Re: How do you define a pointer to an Array

    thanks for your reply.

    as I mentioned earlier I have this API call which gives the pointer to array, then these elements in the array are used in another api call which iterates thru this array. Is there any way I can do this?

    How do I retrieve the value of elements of received array.



    ------------------

  4. #4
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do you define a pointer to an Array

    You cannot do this via silk. You need to creatw a helper dll or exe which will do this since silk cannot.

    Good luck--

    Anthony

    ------------------

  5. #5
    Guest

    Re: How do you define a pointer to an Array

    I had a feeling that is things is doomed to failure but thanks for confirmation.

    Can I use activex dlls created in vb or c++ and use them in silk or do they have to be c dlls?



    ------------------

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do you define a pointer to an Array

    Of course you can, but you have to write the code for which should be like 1, 2, 3.
    Ask your dev to do it it should take like 5 minutes.

    That's called team work. Talk to your manager if you can't convince your fellow Dev. I mean this will reflect on his review if he bitches about such a small favor(if you talk it with his manager too .



    ------------------

  7. #7
    Guest

    Re: How do you define a pointer to an Array

    I have tried wrting activex dlls and tried to access the functions in those dlls but have never sucecedded can you tell me in more detail what I have to do inorder that the functions can be seen from silk. I had used VB to create the dll.
    do I have to do anyhitng special?



    ------------------

  8. #8
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do you define a pointer to an Array

    1)The easiest way is just to write the code in the source of the dll and re-compile it.

    2)I guess you can also call in the dll and then write a function to extract the array elements. It seems to be an overkill.

    You are better off using VC++, VB doesn't have pointer type so I am not sure how you can play with the pointers(maybe there is a trick I am not sure how).
    www.codeproject.com check the dll section.
    I have no time to inverstigate on this stuff right now, but I will if time permits. Post here which approach you will take, and what kind of dll you are using. I might drop in some help when I can. Busy month for me(who is not

    ------------------


    [This message has been edited by GodKnows (edited 04-23-2002).]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:08 AM.

Copyright BetaSoft Inc.