Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Win32 API Declares (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: EditField.SelPlain is not defined in the OnLine Language
Next thread: Shell under Windows w/5.5.1


BibTeX parsing   -   Jan Erik Moström <
  Win32 API Declares   -   Berg, Heath
   RE: Win32 API Declares   -   Berg, Heath
    Re: Win32 API Declares   -   William Yu
   RE: Win32 API Declares   -   Dave DeLong
    Re: Win32 API Declares   -   Asher Dunn
    Re: Win32 API Declares   -   Charles Yeomans
   Re: Win32 API Declares   -   K-werkx Inc. Sales
   Shell under Windows w/5.5.1   -   Tim Jones

Win32 API Declares
Date: 01.04.04 22:10 (Thu, 1 Apr 2004 15:10:00 -0600)
From: Berg, Heath
I'm new to Real-Basic and want to work with the Win32 API's. I'm trying
to use the following declare in Real-Basic, but I'm having issues with
the Any, Byte, and the custom Datatypes. Also how do you know if you are
passing the values byRef or byVal? Does anyone have an idea on how I can
work around these issues? I'm using Win XP Pro, with RB 5.5.1.

Public Declare Function NetUserAdd Lib "netapi32" (lpServer As Any,
ByVal Level As Long, lpUser As USER_INFO_3_API, lpError As Long) As Long

Public Type USER_INFO_3
' Level 0 starts here
Name As Long
' Level 1 starts here
Password As Long
PasswordAge As Long
Privilege As Long
HomeDir As Long
Comment As Long
Flags As Long
ScriptPath As Long
' Level 2 starts here
AuthFlags As Long
FullName As Long
UserComment As Long
Parms As Long
Workstations As Long
LastLogon As Long
LastLogoff As Long
AcctExpires As Long
MaxStorage As Long
UnitsPerWeek As Long
LogonHours As Long
BadPwCount As Long
NumLogons As Long
LogonServer As Long
CountryCode As Long
CodePage As Long
' Level 3 starts here
UserID As Long
PrimaryGroupID As Long
Profile As Long
HomeDirDrive As Long
PasswordExpired As Long
End Type

Thanks,

Heath Berg

------------------------------------------------------------------------------
Confidentiality notice:
This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.

==============================================================================

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

RE: Win32 API Declares
Date: 18.05.04 15:43 (Tue, 18 May 2004 09:43:58 -0500)
From: Berg, Heath
So that is why I was having problems the whole time, just because I had
did not spell REALBasic correct. How could I be so foolish and not
realize that was the problem all along. Let me change that and see if it
solves my problem. Thanks for the great insight into this issue.

Heath

-----Original Message-----
From: <email address removed>
[mailto:<email address removed>] On Behalf Of Asher
Dunn
Sent: Thursday, May 06, 2004 7:17 AM
To: REALbasic Network Users Group
Subject: Re: Win32 API Declares

On Apr 1, 2004, at 4:10 PM, Berg, Heath wrote:

> I'm new to Real-Basic and want to work with the Win32 API's. I'm
trying
> to use the following declare in Real-Basic, but I'm having issues with
> the Any, Byte, and the custom Datatypes. Also how do you know if you
> are
> passing the values byRef or byVal? Does anyone have an idea on how I
> can
> work around these issues? I'm using Win XP Pro, with RB 5.5.1.

The first step in the right direction would be calling it "REALbasic"
not "Real-Basic".

Asher

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

------------------------------------------------------------------------------
Confidentiality notice:
This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.

==============================================================================

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Win32 API Declares
Date: 18.05.04 15:48 (Tue, 18 May 2004 09:48:36 -0500)
From: William Yu

I'm not sure what declare uses Byte, but in most cases you can declare it as
a long. 'Any' and custom Datatypes you can declare as Ptr and pass in a
MemoryBlock.

Regards,
William Yu
<email address removed>

on 5/18/04 9:43 AM, Berg, Heath at <email address removed> wrote:

> So that is why I was having problems the whole time, just because I had
> did not spell REALBasic correct. How could I be so foolish and not
> realize that was the problem all along. Let me change that and see if it
> solves my problem. Thanks for the great insight into this issue.
>
> Heath
>
> On Apr 1, 2004, at 4:10 PM, Berg, Heath wrote:
>
>> I'm new to Real-Basic and want to work with the Win32 API's. I'm
> trying
>> to use the following declare in Real-Basic, but I'm having issues with
>> the Any, Byte, and the custom Datatypes. Also how do you know if you
>> are
>> passing the values byRef or byVal? Does anyone have an idea on how I
>> can
>> work around these issues? I'm using Win XP Pro, with RB 5.5.1.
>
> The first step in the right direction would be calling it "REALbasic"
> not "Real-Basic".
>
> Asher

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

RE: Win32 API Declares
Date: 18.05.04 18:50 (Tue, 18 May 2004 13:50:19 -0400)
From: Dave DeLong
Heath, your sarcasm is not really appreciated and doesn't contribute to a
good atmosphere here on the list, even if it was a dumb comment. Asher was
just trying to be helpful (in a non-constructive way).

Asher, if you don't have anything relevent to say, don't say it at all.

Dave

>From: "Berg, Heath" <<email address removed>>
>Reply-To: REALbasic NUG <<email address removed>>
>To: "REALbasic NUG" <<email address removed>>
>Subject: RE: Win32 API Declares
>Date: Tue, 18 May 2004 09:43:58 -0500
>
>So that is why I was having problems the whole time, just because I had
>did not spell REALBasic correct. How could I be so foolish and not
>realize that was the problem all along. Let me change that and see if it
>solves my problem. Thanks for the great insight into this issue.
>
>Heath
>
>On Apr 1, 2004, at 4:10 PM, Berg, Heath wrote:
>
> > I'm new to Real-Basic and want to work with the Win32 API's. I'm
>trying
> > to use the following declare in Real-Basic, but I'm having issues with
> > the Any, Byte, and the custom Datatypes. Also how do you know if you
> > are
> > passing the values byRef or byVal? Does anyone have an idea on how I
> > can
> > work around these issues? I'm using Win XP Pro, with RB 5.5.1.
>
>The first step in the right direction would be calling it "REALbasic"
>not "Real-Basic".
>
>Asher

_________________________________________________________________
Best Restaurant Giveaway Ever! Vote for your favorites for a chance to win
$1 million! http://local.msn.com/special/giveaway.asp

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Win32 API Declares
Date: 18.05.04 19:15 (Tue, 18 May 2004 14:15:13 -0400)
From: Asher Dunn

On May 18, 2004, at 1:50 PM, Dave DeLong wrote:

> Asher, if you don't have anything relevent to say, don't say it at all.
>

There was a quite large discussion on this a while back, and I wrote
that message a while back (my email has been broken). It was
inappropriate at this time. It was meant to come right in the middle of
that issue about a month ago, but now it is completely out of context
and rude.

sorry.

Asher

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Win32 API Declares
Date: 18.05.04 20:02 (Tue, 18 May 2004 15:02:48 -0400)
From: Charles Yeomans
I appreciated it.

Charles Yeomans

On May 18, 2004, at 1:50 PM, Dave DeLong wrote:

> Heath, your sarcasm is not really appreciated and doesn't contribute
> to a good atmosphere here on the list, even if it was a dumb comment.
> Asher was just trying to be helpful (in a non-constructive way).
>
> Asher, if you don't have anything relevent to say, don't say it at all.
>
> Dave

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Win32 API Declares
Date: 02.04.04 01:35 (Thu, 01 Apr 2004 18:35:04 -0600)
From: K-werkx Inc. Sales
> I'm new to Real-Basic and want to work with the Win32 API's

Here is an old but still usefull tutorial for working with declares. It also
has suggestions to match data types.

http://www.nd.edu/~jvanderk/rbm/6-99/index.html

There is also a good example project out on the net to which I cannot find a
link at this time it covers many of the situations you would run into with
Win32 API. If you cannot find it send me an off list message and I will
email it to you.

>Public Declare Function NetUserAdd Lib "netapi32" (lpServer As Any,
Any? seems a little strange the notation system MS uses for naming data
types seems to indicate this is a long (32 bit) in
which is also a pointer if I remember correctly.

Ultimately you should familiarize yourself with the realbasic memoryblock.
This allows you to create all kinds of data types so to speak. In the case
of large custom types/structs like USER_INFO_3_API you may be able to create
a mem block that matches the struct. e.g. Name As Long this is 4 bytes of
integer data, Password As Long another for bytes for a total of 8 bytes of a
memory block etc. Just remember to set the little Endian value to true,
that one has got me more than once. Sometimes it just takes a little
experimentation but you can usually come up with something that will work.







- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>