RE: Win32::API

2003-07-04 Thread Borkur Gudjonsson
That works. Thanks a lot :)

Regards,
Borkur Gudjonsson

  Hi.
 
  I'm using Win32::API v0.41 with Perl 5.8.0 build 805 on 
 WinXP Pro. I'm 
  having trouble with a DLL I made with VC++ 6.0 Service Pack 5.
 
  When I run the script it outputs 'ABCD' and then Perl crashes.
 
 
 Yes - it did the same for me.
 Building from the command line I was able to get it working 
 fine by running the following to build the dll:
 
 cl -LD -Gz bg_dll.cpp bg_dll.def
 
 '-LD' tells the compiler to build a dll.
 '-Gz' tells the compiler to build the dll using the __stdcall 
 calling convention. (You should also be able to achieve that 
 by rewriting 'int test(LPCTSTR strText)' as 'int __stdcall 
 test(LPCTSTR strText)' in which case you don't need to 
 specify '-Gz' ...  but I didn't check that.) 'bg_dll.cpp' 
 is of course the source file and 'bg_dll.def' is a file 
 containing the following 2 lines: EXPORTS test
 
 (For the purposes of running the perl script I wasn't 
 interested in exporting the other function.)
 
 The perl script then ran as intended.
 
 I think you'll always need to invoke the __stdcall calling 
 convention. Not sure of how you want to go about exporting 
 the function from the dll. Hopefully, now that you have a 
 method of getting it to work, you can play about with it to 
 work out just exactly what was going wrong with the exporting 
 of the function.
 
 I founf that if I simply built the dll with:
 cl -LD -Gz bg_dll.cpp
 then the perl script printed Error, because $function was 
 not defined.
 
 Hth.
 
 Cheers,
 Rob
 
 
 
 
 
 ___
 Perl-Win32-Users mailing list 
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32::API

2003-07-03 Thread Borkur Gudjonsson
Hi.

I'm using Win32::API v0.41 with Perl 5.8.0 build 805 on WinXP Pro.
I'm having trouble with a DLL I made with VC++ 6.0 Service Pack 5.

When I run the script it outputs 'ABCD' and then Perl crashes.

Regards,
Borkur Gudjonsson


-- Start DLL --
#include stdafx.h
#include stdio.h

extern C __declspec(dllexport)
int test(LPCTSTR strText)
{
printf(strText);
return 1;
}

BOOL APIENTRY DllMain(HANDLE hModule, 
  DWORD  ul_reason_for_call, 
  LPVOID lpReserved)
{
return TRUE;
}
-- End DLL --

-- Start script --
#!/usr/bin/perl -w
use strict;
use Win32::API;

my $function = Win32::API-new('bg_dll', 'test', ['P'], 'I');
if (!defined($function))
{
  print STDERR Error\n;
  exit(1);
}
my $str = ABCD;
my $ret = $function-Call($str);
print \$ret=$ret\n;
exit(0);
__END__
-- End script --


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Build Html Help

2003-06-27 Thread Borkur Gudjonsson
Hi.
I´m trying to rebuild the HTML documentation. I used to do it with

perl -MHtmlHelp -e HtmlHelp::MakePerlHtml()

but the module HtmlHelp seems to be gone!
I'm using v5.8.0 build 805 on WinXP Professional.

Regards,
Borkur Gudjonsson


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


PPM trouble

2000-12-13 Thread Borkur Gudjonsson

When I try to verify installed modules this is what happens:

---START---
C:\ppm
PPM interactive shell (2.1.1) - type 'help' for available commands.
PPM verify
Package 'MIME-Lite' is up to date.
Package 'Class-Tom' is up to date.
Package 'MD5' is up to date.
Package 'DBD-Oracle' is up to date.
Package 'TermReadKey' is up to date.
Package 'Date-Manip' is up to date.
Package 'HTML-Tree' is up to date.
Package 'Date-Calc' is up to date.

unclosed token at line 18, column 34, byte 1282 at C:/Perl/site/lib/SOAP/Parser.pm 
line 73

C:\
---END---

I'm using ActivePerl 5.6.0 Build 620 on Windows 2000 Professional (v5.00.2195 Service 
Pack 1)
Can someone help me please?

Regards,
Borkur Gudjonsson

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users