Search:

Type: Posts; User: laimaretto

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    5,922

    MYSQL + POSIX Threads

    Hi all,

    I've succesfully implemented a MYSQL access using mysql.h. I'm only doing SQL INSERT kind-of queries and they are being inserted nicely in the MYSQL engine.

    Latter on I've realized that...
  2. Ok, so here are the functions freeing (and...

    Ok, so here are the functions freeing (and deleting) the memory used:

    string2bstr:


    BSTR string2bstr(string input_string)
    {
    // MultyBytetoWideChar converts ANSI strings to UNICODE
    ...
  3. @adeyblue/bithub: Sorry if this question is...

    @adeyblue/bithub:

    Sorry if this question is somehow silly or generic but: how do you know or what did you do to see/test/findout that the functions are leaking memory? How do I prevent this memory...
  4. Hi All, After searching for info, I came out...

    Hi All,

    After searching for info, I came out with two functions to come and go from BSTR to std::string and vice versa...

    The functions work fine for me and I can call them directly from a Cell...
  5. Hi tabstop, this function works nice. I have some...

    Hi tabstop, this function works nice. I have some questions though:

    1) How did you know that you had to use the MultiByteToWideChar function? I assume by this then that VBA expects...
  6. Ok, just to clarify: 0) I understand that...

    Ok, just to clarify:

    0) I understand that wide-char=two-byte per char=Unicode while char=one-byte per char=ANSI. Please, correct me if I'm wrong.

    1) A VBA Variant that contains a string is...
  7. Hi, thanks ... and yes, I do realize, the thing...

    Hi, thanks ... and yes, I do realize, the thing is I want to do it via a C++ DLL ... :-)

    Cheers!
  8. Cannot convert two digit-long integer to std::string

    Hi everyone:

    I'm dealing with some DLLs that I'm trying to call from Excel.

    The issue is that, depending on how I call from VBA the DLL then it works or it does not:

    Here's the c++ code:
  9. No, it does not. This is the output: ...

    No, it does not. This is the output:

    =string_test1(): 敔瑳湩⁧㈱3
    =string_test2("Lucas"): Lucas

    string_test1 returns a string longer than 1 char, but not "Testing123" as you have put in the code of...
  10. Actually, I've tried this as well ... BSTR...

    Actually, I've tried this as well ...


    BSTR string_ex(BSTR stringVar)
    {
    string buffer((char*)stringVar);
    // code. here we work with 'buffer'. once done
    // copy its content to...
  11. Yes and no: it does compile well with no errors,...

    Yes and no: it does compile well with no errors, but, when I call the function from Excel like this =string_ex("Lucas") I can only see "L" as a result.

    The returned string is being stripped: I do...
  12. Yeap ... "-Wl,--add-stdcall-alias" did the trick...

    Yeap ... "-Wl,--add-stdcall-alias" did the trick ... now I can call the simple function from Excel and I got a result ...

    Now I'm going back to the old BSTR problem ... :)

    Thanks!

    Lucas
    ...
  13. Ok, I'm trying to do the simplest code ... ...

    Ok, I'm trying to do the simplest code ...

    VBA:

    Public Declare Function mult Lib _
    "d:\datos\doc\tech\c++\excel\ipfnc_dll\ipfnc.dll" _
    (ByVal x As Integer) As Integer

    C++:
  14. Replies
    2
    Views
    3,518

    Ok, solved it. I did as you suggested. Removed...

    Ok, solved it.

    I did as you suggested. Removed every IDE and also MinGW (there was only one version of it). I did remove the calls to MinGW in the path variable. Finally reinstalled only...
  15. Replies
    2
    Views
    3,518

    Cant compile using Codeblocks 10.05

    Hi All,

    I was using Dev-C++ 4.9.9.2 under Windows Xp-SP2 and I could at the time compile some console applications and also some basic DLLs that I would call from Excel (by using VBA).

    By...
  16. Hi, After downloading Code::blocks and...

    Hi,

    After downloading Code::blocks and wxDev-C++, I can no longer use successfully the DLL in Excel, even with a simple function.

    I had this simple function ...

    VBA:


    Declare Function...
  17. Thanks, I got to link the code with the library...

    Thanks, I got to link the code with the library ... and it compiles now ...

    However, when calling the DLL from within VBA, Excel returns #VALUE! ... there is still something wrong with the types,...
  18. Thanks, but, where do I get that library from? I...

    Thanks, but, where do I get that library from? I was expecting to find it within wxDev-C++ or Codeblocks ... :-S
  19. Hi ... I've downloaded both code::blocks and...

    Hi ...

    I've downloaded both code::blocks and wxDec-C++ but compilation failed with both of them ...

    Same error as before ...

    - Output Codeblocks:


    - Output xwDev-C++:
  20. Elysia/Codeplug: Thanks for your quick answers...

    Elysia/Codeplug:

    Thanks for your quick answers .... I'm already downloading these IDEs ...

    After that I'll retry and let you know how did all go ...

    Many thanks and BRs,

    Lucas
  21. @Codeplug: Thanks! let me have a look a those...

    @Codeplug:

    Thanks! let me have a look a those ... any preference?

    Cheers!

    Lucas
  22. Hi Codeplug, Thanks for the reply and for your...

    Hi Codeplug,

    Thanks for the reply and for your suggestion.

    I've tried before what you suggest but I cannot compile your code. This is the compiler's output:


    Compiler: Default compiler...
  23. Yes, I've seen this. If declare my C++ function...

    Yes, I've seen this. If declare my C++ function with input parameter of type LPSTR then I can send BvVal a string from VBA and that will work (which is what I want).

    Then, since I have a char*...
  24. Hi! So, some new and fresh information (at...

    Hi!

    So, some new and fresh information (at least for me).

    Just for information, I've found this link very useful:

    Passing Strings to a DLL Procedure

    Now, going to the matter. I've managed...
  25. Hi All, Thanks everyone for the replies. ...

    Hi All,

    Thanks everyone for the replies.

    I've been reading some information on the web but I'm somehow confused (actually: a lot).

    As far as I've read, the following occurs:

    VBA, when...
Results 1 to 25 of 27
Page 1 of 2 1 2