Help please.

I'm trying to embed the following "very few" Perl lines in a Microsoft
Visual C++ v6 C program.

//use Mail::SpamAssassin;
//my $spamobj = Mail::SpamAssassin->new();
//my $status = $spamobj->check_message_text($input);
//my $spamstr = (($status->is_spam()) ? "Yes" : "No");
//my $output = sprintf("%.1f\nX-Spam-Status: %s, hits=%.1f required=%.1f
tests=%s\nSeems_OK", $status->get_hits(), $spamstr, $status->get_hits(),
$status->get_required_hits(), $status->get_names_of_tests_hit());
//$status->finish();
//if(defined $output) { undef $output; }
//if(defined $spamstr) { undef $spamstr; }
//if(defined $status) { undef $status; }
//if(defined $spamobj) { undef $spamobj; }
//if(defined $input) { undef $input; }

I've gotten as far as "result=eval_pv("use Mail::SpamAssassin;", FALSE);"
and it returns without an error, but I don't know where to go from here
other than to keep groping in the dark more.

I've got the "Extending and Embedding Perl" book by Tim Jenness and Simon
Cozens, and I've read through the "perlembed" pages that are copied all over
the internet, but I still don't understand how to deal with these
"Mail::SpamAssassin->new()" objects.

Basically, I need to pass the "$input" string from the C program to the Perl
code above and then get the "$output" string back from the Perl code above
to the C program in a C string.

Help please.

Joe



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to