Public Declare Auto Function SendMessageRef Lib "user32.dll" Alias
"SendMessage" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal
wParam As Integer, ByRef lParam As PARAFORMAT2) As Integer
PARAFORMAT2 is a structure that SendMessage will return stuff in.
Is the ByRef correct or since only a pointer is being passed should it be
ByVal?
Suppose I was passing data rather then receiving it,
would that change the answer to the above?
Thanks in advance 3 1341
" Just Me" <ne********@a-znet.com> wrote in message
news:uZ*************@TK2MSFTNGP11.phx.gbl... Public Declare Auto Function SendMessageRef Lib "user32.dll" Alias
"SendMessage" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal
wParam As Integer, ByRef lParam As PARAFORMAT2) As Integer PARAFORMAT2 is a structure that SendMessage will return stuff in.
Is the ByRef correct or since only a pointer is being passed should it be
ByVal? Suppose I was passing data rather then receiving it,
would that change the answer to the above? Thanks in advance
As you multiposted this same question to the C# group, please see my
response there.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
* " Just Me" <ne********@a-znet.com> scripsit: Public Declare Auto Function SendMessageRef Lib "user32.dll" Alias
"SendMessage" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal
wParam As Integer, ByRef lParam As PARAFORMAT2) As Integer
PARAFORMAT2 is a structure that SendMessage will return stuff in.
Is the ByRef correct or since only a pointer is being passed should it be
Pass it 'ByRef'.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Thanks to both of you.
Needed the answer ASAP and got it ASAP
" Just Me" <ne********@a-znet.com> wrote in message
news:uZ*************@TK2MSFTNGP11.phx.gbl... Public Declare Auto Function SendMessageRef Lib "user32.dll" Alias
"SendMessage" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal
wParam As Integer, ByRef lParam As PARAFORMAT2) As Integer PARAFORMAT2 is a structure that SendMessage will return stuff in.
Is the ByRef correct or since only a pointer is being passed should it be
ByVal? Suppose I was passing data rather then receiving it,
would that change the answer to the above? Thanks in advance
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andy Read |
last post by:
Dear all,
I thought I understood passing parameters ByVal and ByRef but I
clearly don't! If I define a simple class
of:
Public Class Person
Public Name as String
Public Age as Integer
End...
|
by: Mike MacSween |
last post by:
Just spent a happy 10 mins trying to understand a function I wrote sometime
ago.
Then remembered that arguments are passed by reference, by default.
Does the fact that this slowed me down...
|
by: Scott M. |
last post by:
If I pass a reference type ByVal, am I making a copy of the object on the
heap or am I making a copy of a pointer to the object on the heap?
If I pass a string object (reference type) into a sub...
|
by: Dennis D. |
last post by:
Hello:
I want a function to return three variables to the calling procedure:
Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As...
|
by: Erik Foreman |
last post by:
this is what I have
'variables defined as arrays
Dim ceday(), ceti(), ceto(), ceproj(), cenotes() As String
Dim cerow As Int32
|
by: Witold Iwaniec via .NET 247 |
last post by:
It seems that when you pass an object to a function it is always passed by reference even if it is explicitly declared ByVal. Is it the behavior of VB.Net?
Here is sample code from sample Asp.Net...
|
by: John Pass |
last post by:
Hi,
In the attached example, I do understand that the references are not changed
if an array is passed by Val. What I do not understand is the result of line
99 (If one can find this by line...
|
by: Scott M. |
last post by:
Does C# support passing arguments ByVal & ByRef? If so, what is the default
(ByVal?)? And, if so, how do you explicitly specify either?
Thanks.
|
by: John Sheppard |
last post by:
Hello there I was wondering if anyone could help me,
I am trying to pass a typed dataset to a dialoged child form by reference.
I have binding sources sitting on the child form. So to refresh...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |