Search Results - VBForums

Search:

Type: Posts; User: jmsrickland

Page 1 of 13 1 2 3 4

Search: Search took 0.26 seconds.

  1. Replies
    7
    Views
    112

    Re: Type mismatch error with UDT

    C code



    typedef struct tagCON
    {
    PI argpi[coMAX][cpiMAX];

    int argcpi[coMAX];
  2. Replies
    7
    Views
    112

    Re: Type mismatch error with UDT

    So it's a problem in VB but it doesn't appear to be one in C as my VB code is from the below C code



    '
    '
    PSTE pste = pcon->argste;
    '
    '
  3. Replies
    7
    Views
    112

    Type mismatch error with UDT

    I'm getting a Type mismatch when I attempt to copy one UDT into another UDT. Is this even allowed.

    In .BAS module



    Public Type tagCM
    isqFrom As Integer
    isqTo As Integer
    cmk As...
  4. Replies
    15
    Views
    296

    Re: Select Case error

    Yes, that is the reason. I copied this code from a C program and I missed that one. It should be Select Case and not Switch. Once I changed it the original code in my program worked.

    Thanks to all...
  5. Replies
    15
    Views
    296

    Re: Select Case error

    I don't see any Switch in the code I posted. However, switch is C's equivalent of VB's Select Case
  6. Replies
    15
    Views
    296

    Re: Select Case error

    I always do 2...



    Select Case iSomeTest
    Case 1
    code
    Case 2
    more code
    Case 3
  7. Replies
    15
    Views
    296

    Re: Select Case error

    Mark, I stripped out all the code under the Case statements to 1) shorten the entire code to make it visible in one window, 2) only show the select statements to be able to analyse it better
  8. Replies
    15
    Views
    296

    Re: Select Case error

    What do you mean
  9. Replies
    12
    Views
    255

    Re: CreateThread Problem

    Well, Olaf, that is as clear as mud (to me):confused:

    Anyway, I found a project that uses CreateThread that works:) I implemented his code into my code and it did work:) I'm not sure at this time...
  10. Replies
    12
    Views
    255

    Re: CreateThread Problem

    Don't think that's the reason as I tried these combinations of using ByVal

    CreateThread(ByVal 0&, ByVal 0, AddressOf DwEngine, pv, ByVal 0, dw)
    CreateThread(0&, ByVal 0, AddressOf DwEngine, pv,...
  11. Replies
    15
    Views
    296

    [RESOLVED] Select Case error

    I'm getting Case Else outside Select Case error. I don't see it



    Public Sub Command1_Click()
    Dim argv() As String
    Dim sz As Integer

    Select Case argv(sz)
    Case "/"
  12. Replies
    12
    Views
    255

    CreateThread Problem

    program crashes when it calls CreateThread

    Here is the VB function



    Public Declare Function CreateThread Lib "kernel32" _
    (lpThreadAttributes As Long, _
    ByVal dwStackSize As Long, _
    ...
  13. Replies
    16
    Views
    300

    Re: WaitForSingleObject

    I used VB6.exe also and still no out of memory
  14. Replies
    16
    Views
    300

    Re: WaitForSingleObject

    I didn't have that 'out of memory' problem but that maybe is because I made a Form only exe just to test the demo app
  15. Replies
    16
    Views
    300

    Re: WaitForSingleObject

    I'm in the process of converting a C app to VB. It's fairly large app but I have so far done quite a bit conversion and I do come across functions that I don't understand or why my VB equivalent...
  16. Replies
    16
    Views
    300

    Re: WaitForSingleObject

    OK, that makes sense but this application doesn't do anything like that. It terminates itself which means it will not do other things and that is what doesn't make any sense to me.
  17. Replies
    16
    Views
    300

    Re: WaitForSingleObject

    Do you know anything about this application. I don't get it. It doesn't make any sense to me. It launches an exe then it terminates itself. What's the point of that? The launched exe remains running...
  18. Replies
    16
    Views
    300

    WaitForSingleObject

    Can someone explain how WaitForSingleObject works and what is it used for
  19. Replies
    6
    Views
    227

    Re: Send Null to CreateEvent

    OK, I understand, thanks all.
  20. Replies
    6
    Views
    227

    Re: Send Null to CreateEvent

    Why does then MSDN show the function as using Boolean and not Long
  21. Replies
    6
    Views
    227

    Re: Send Null to CreateEvent

    They were defined as Long because that is the way VB had it in it's API Viewer but when I looked the function up on MSDN they had it defined as Boolean and also the C program I converting had them as...
  22. Replies
    9
    Views
    218

    Re: vsprintf in VB

    Couldn't I make a C function that implements the printf, vsprintf, etc functions; give the function the same parameters that you would use in C; make it a DLL and call that from VB
  23. Replies
    9
    Views
    218

    vsprintf in VB

    Does anyone have a VB function that replicates the C vsprintf function
  24. Replies
    6
    Views
    227

    [RESOLVED] Send Null to CreateEvent

    .BAS code



    Private Type SECURITY_ATTRIBUTES
    nLength As Long
    lpSecurityDescriptor As Long
    bInheritHandle As Long
    End Type
  25. Re: [RESOLVED] Sending a Null argument to function

    Where ever I saw char * argv[] as an argument in the C parameter list of a function I made it ByRef argv() As String (I know ByRef is VB default I just do it anyway)

    Where ever I saw char *...
  26. Re: [RESOLVED] Sending a Null argument to function

    I'm beginning to think you are correct about the string. I'm going to change all var_name(nn) as String to var_name as String * nn although the functions in the C code take the argument as char *...
  27. Re: Problem with Property Let/Get in Class module

    OK, I changed over to Friend. It removed the error I was having. OK, so far. Thanks, Elroy, for the suggestion
  28. Re: Can VB function return a UDT (structure)

    OK, I changed the UDT to a Class. I have a few issues with it but those I'll address later but for now I have this problem. Going back to my original post I now run this code again:



    Public...
  29. Re: Problem with Property Let/Get in Class module

    That's not the problem as it gives same results with or without the () and it is defined as array in the Class
  30. [RESOLVED] Problem with Property Let/Get in Class module

    I have this in a Class



    Private cls_argcm() As tagCM
    Private cls_arghashkRep() As Long
    '
    '
    '
    Public Property Get arghashkRep() As Long()
  31. Replies
    20
    Views
    485

    Re: Converting C to VB problem

    It only works if the data type is instricint (if that's the correct word?) like Byte, Integer, Long, String, etc.

    It does not work if the data type is user defined which is one of the reasons why...
  32. Replies
    13
    Views
    331

    Re: C pointers in VB

    I'm beginning to understand more now.

    So if I see &x in C I just treat it as x in VB?
  33. Replies
    2
    Views
    213

    Re: Not understanding Class

    Thanks again
  34. Replies
    20
    Views
    485

    Re: Converting C to VB problem

    Thanks, passel, I knew it had to be something simple but it just didn't occur to me
  35. Replies
    2
    Views
    213

    [RESOLVED] Not understanding Class

    Attempting to make my own class as shown below

    Class clsCon code



    Private cls_argpi(coMAX, cpiMAX) As tagPI
    Private cls_argcpi(coMAX) As Integer
    Private cls_argsq(csqMAX) As tagSQ
    Private...
  36. Replies
    20
    Views
    485

    Re: Converting C to VB problem

    Attempting to use your suggestion I renamed all the members of clsCON and implemented a Property Get and a Property Let for just one of the member to test


    Class clsCon code



    Private...
  37. Replies
    13
    Views
    331

    C pointers in VB

    In the C program I have that I am trying to convert over to VB I see tons of pointers (*pv, etc)

    Can I use VarPtr() for these?

    In C

    void *pv;

    pv = something;
  38. Re: Can VB function return a UDT (structure)

    OK, I will check into using Long for C int and Byte for C char

    After playing around with some makeshift code I have come to the conclusion that the problem lies within the tagCon UDT. I made a...
  39. Re: Can VB function return a UDT (structure)

    Actually that wouldn't be the case as PConInitEngine has everything commented out. I'm just trying to step through the procedure calls as they are in the C. The last procedure on the chain is always...
  40. Re: Can VB function return a UDT (structure)

    Are the tagCON members that are also UDTs, declared public also?

    Yes. I made everything Public even the members because I copied the C code basically as is and I saw where these were referenced in...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.