@@ -607,8 +607,8 @@ sub parse_prototype {
607
607
608
608
#
609
609
# XXX hack, see the proper implementation in TODO
610
- # The point here is dont let fork children free the parent's DLLs.
611
- # CLONE runs on ::API and ::More, thats bad and causes a DLL leak, make sure
610
+ # The point here is don't let fork children free the parent's DLLs.
611
+ # CLONE runs on ::API and ::More, that's bad and causes a DLL leak, make sure
612
612
# CLONE dups the DLL handles only once per CLONE
613
613
# GetModuleHandleEx was not used since that is a WinXP and newer function, not Win2K.
614
614
# GetModuleFileName was used to get full DLL pathname incase SxS/multiple DLLs
@@ -794,7 +794,7 @@ readable, GetLastError will be ERROR_NOACCESS.
794
794
795
795
The C prototype of the function. If you are using a function pointer, the name
796
796
of the function should be something "friendly" to you and no attempt is made
797
- to retrive such a name from any DLL's export table. This name for a function
797
+ to retrieve such a name from any DLL's export table. This name for a function
798
798
pointer is also used for Import().
799
799
800
800
=back
@@ -830,7 +830,7 @@ readable, GetLastError will be ERROR_NOACCESS.
830
830
=item 3.
831
831
The name of the function (as exported by the library) or for function pointers
832
832
a name that is "friendly" to you. This name for a function pointer is also used
833
- for Import(). No attempt is made to retrive such a name from any DLL's export
833
+ for Import(). No attempt is made to retrieve such a name from any DLL's export
834
834
table in the 2nd case.
835
835
836
836
=item 4.
@@ -1006,11 +1006,11 @@ integer C<0>.
1006
1006
1007
1007
It is suggested to
1008
1008
not use P as a return type and instead use N and read the memory yourself, and
1009
- free the pointer if applicable. This pointer is effectivly undefined after the
1009
+ free the pointer if applicable. This pointer is effectively undefined after the
1010
1010
C function returns control to Perl. The C function may not hold onto it after
1011
1011
the C function returns control. There are exceptions where the pointer will
1012
1012
remain valid after the C function returns control, but tread at your own risk,
1013
- and at your knowledge of Perl interpretor 's C internals.
1013
+ and at your knowledge of Perl interpreter 's C internals.
1014
1014
1015
1015
=item C<T > :
1016
1016
value is a Win32::API::Struct object, in parameter only, pass by reference
@@ -1021,25 +1021,25 @@ value is a Win32::API::Callback object, in parameter only, (see L<Win32::API::Ca
1021
1021
1022
1022
=item C<V > :
1023
1023
no value, no parameters, stands for C<void > , may not be combined with any other
1024
- letters, equivelent to a ""
1024
+ letters, equivalent to a ""
1025
1025
1026
1026
=back
1027
1027
1028
1028
For beginners, just skip this paragraph.
1029
1029
Note, all parameter types are little endian. This is probably what you want
1030
- unless the documentation for the C function you are calling explictly says
1030
+ unless the documentation for the C function you are calling explicitly says
1031
1031
the parameters must be big endian. If there is no documentation for your C
1032
- function or no mention of endianess in the doucmentation , this doesn't apply
1033
- to you and skip the rest of this paragraph. There is no inherant support
1032
+ function or no mention of endianess in the documentation , this doesn't apply
1033
+ to you and skip the rest of this paragraph. There is no inherent support
1034
1034
for big endian parameters. Perl's scalar numbers model is that numeric
1035
- scalars are effectivly opaque and their machine representation is
1036
- irrelavent . On Windows Perl, scalar numbers are little endian
1035
+ scalars are effectively opaque and their machine representation is
1036
+ irrelevant . On Windows Perl, scalar numbers are little endian
1037
1037
internally. So C<$number = 5; print "$number"; > will put 5 on the screen.
1038
1038
C<$number > given to Win32::API will pass little endian integer 5 to the C
1039
1039
function call. This is almost surly what you want. If you really must pass
1040
1040
a big endian integer, do C<$number = unpack('L', pack('N', 5)); > , then
1041
1041
C<print "$number"; > will put 83886080 on the screen, but this is big endian 5,
1042
- and passing 83886080 to C<-E<gt> Call()> will make sure that that
1042
+ and passing 83886080 to C<-E<gt> Call()> will make sure that
1043
1043
the C function is getting big endian 5. See L<perlpacktut> for more.
1044
1044
1045
1045
Our function needs two parameters: a number (C<DWORD > ) and a pointer to a
@@ -1166,8 +1166,8 @@ them as parameters to Win32::API functions. A short example follows:
1166
1166
1167
1167
Note that this works only when the function wants a
1168
1168
B<pointer to a structure > , not a "pass by copy" structure. As you can see, our
1169
- structure is named 'POINT', but the API used 'LPPOINT'. Some herustics are
1170
- done to vaildate the argument's type vs the parameter's type if the function
1169
+ structure is named 'POINT', but the API used 'LPPOINT'. Some heuristics are
1170
+ done to validate the argument's type vs the parameter's type if the function
1171
1171
has a C prototype definition (not letter definition). First, if the parameter
1172
1172
type starts with the LP prefix, the LP prefix is stripped, then compared to
1173
1173
the argument's type. If that fails, the Win32::API::Type database
@@ -1236,10 +1236,10 @@ Probes a memory block for C<$length> bytes for readability. Returns true if
1236
1236
access violation occurs, otherwise false is returned. This function is useful
1237
1237
to avoid dereferencing pointers which will crash the perl process. This function
1238
1238
has many limitations, including not detecting uninitialized memory, not
1239
- detecting freed memory, and not detecting giberrish . It can not tell whether a
1239
+ detecting freed memory, and not detecting gibberish . It can not tell whether a
1240
1240
function pointer is valid x86 machine code. Ideally, you should never use it,
1241
1241
or remove it once your code is stable. C<$ptr > is in the format of 123456,
1242
- not C<"\x01\x02\x03\x04" > . See MS's documentation for alot more
1242
+ not C<"\x01\x02\x03\x04" > . See MS's documentation for a lot more
1243
1243
on this function of the same name.
1244
1244
1245
1245
=head3 SafeReadWideCString
@@ -1331,7 +1331,7 @@ not called.
1331
1331
=item buffer overflow protection
1332
1332
1333
1333
Introduced in 0.69. If disabling is required, which is highly
1334
- B<not recommended > , set an enviromental variable called
1334
+ B<not recommended > , set an environmental variable called
1335
1335
WIN32_API_SORRY_I_WAS_AN_IDIOT to 1.
1336
1336
1337
1337
=item automatic un/pack
@@ -1413,7 +1413,7 @@ See L<http://dev.perl.org/licenses/artistic.html>
1413
1413
All the credits go to Andrea Frosini for the neat assembler trick
1414
1414
that makes this thing work. I've also used some work by Dave Roth
1415
1415
for the prototyping stuff. A big thank you also to Gurusamy Sarathy
1416
- for his unvaluable help in XS development, and to all the Perl
1416
+ for his invaluable help in XS development, and to all the Perl
1417
1417
community for being what it is.
1418
1418
1419
1419
Cosimo also wants to personally thank everyone that contributed
0 commit comments