Click here to Skip to main content
15,925,255 members
Home / Discussions / C#
   

C#

 
QuestionPrint multiple copies of a page? Pin
DaleEMoore24-Jan-08 10:49
DaleEMoore24-Jan-08 10:49 
GeneralRe: Print multiple copies of a page? Pin
Gareth H24-Jan-08 10:59
Gareth H24-Jan-08 10:59 
GeneralRe: Print multiple copies of a page? Pin
DaleEMoore24-Jan-08 11:22
DaleEMoore24-Jan-08 11:22 
GeneralRe: Print multiple copies of a page? Pin
DaleEMoore24-Jan-08 11:30
DaleEMoore24-Jan-08 11:30 
QuestionIssue using .dll in Program vs Service Pin
abupsman24-Jan-08 9:43
abupsman24-Jan-08 9:43 
GeneralRe: Issue using .dll in Program vs Service Pin
Luc Pattyn24-Jan-08 10:15
sitebuilderLuc Pattyn24-Jan-08 10:15 
GeneralRe: Issue using .dll in Program vs Service Pin
abupsman24-Jan-08 10:30
abupsman24-Jan-08 10:30 
GeneralRe: Issue using .dll in Program vs Service Pin
Luc Pattyn24-Jan-08 10:51
sitebuilderLuc Pattyn24-Jan-08 10:51 
Hi Don,

some more ideas:

1.
if you have the source of the unmanaged code, you can add logging there too.
what I typically do is make it such that the unmanaged code logs to the managed world,
using a delegate (which becomes a function pointer).

2.
if the DLL has a simpler function somewhere, try that one first; or if you have the source,
add a simple function and try it (e.g. something that takes two ints and returns the product).
Success here proves you are accessing the DLL, and doing some P/Invoke correctly.

3.
I was a little surprised by the explicit NULL char in one of the args; if you try to get
a double NULL to the unmanaged world, I am not sure the marshaling will do that for you.

4.
if the unmanaged code throws an exception, it might just kill the thread without you noticing
(depending on which timer you use, you may get a separate thread).
You said "as if the function was not called", does the code return well from the unmanaged function, i.e. does the next (log) line get executed?

5.
If everything else fails my best guess is the unmanaged code executes but fails maybe
because there is no user, hence no "My Documents" and the like. Good error trapping should
catch that.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: Issue using .dll in Program vs Service Pin
abupsman24-Jan-08 11:56
abupsman24-Jan-08 11:56 
GeneralRe: Issue using .dll in Program vs Service Pin
Luc Pattyn24-Jan-08 12:04
sitebuilderLuc Pattyn24-Jan-08 12:04 
GeneralCustom tab control Pin
DanB198324-Jan-08 7:58
DanB198324-Jan-08 7:58 
GeneralRe: Custom tab control Pin
led mike24-Jan-08 9:41
led mike24-Jan-08 9:41 
GeneralRe: Custom tab control Pin
DanB198324-Jan-08 9:50
DanB198324-Jan-08 9:50 
GeneralRe: Custom tab control Pin
led mike24-Jan-08 10:31
led mike24-Jan-08 10:31 
GeneralRe: Custom tab control Pin
DanB198325-Jan-08 0:14
DanB198325-Jan-08 0:14 
GeneralRe: Custom tab control Pin
led mike25-Jan-08 5:56
led mike25-Jan-08 5:56 
GeneralRe: Custom tab control Pin
DanB198326-Jan-08 1:29
DanB198326-Jan-08 1:29 
QuestionWPF Transparent Window - can it still detect events? Pin
Member 429406224-Jan-08 7:44
Member 429406224-Jan-08 7:44 
AnswerRe: WPF Transparent Window - can it still detect events? Pin
i_want_to_learn_c#24-Jan-08 8:11
i_want_to_learn_c#24-Jan-08 8:11 
AnswerRe: WPF Transparent Window - can it still detect events? Pin
Paul Conrad24-Jan-08 8:39
professionalPaul Conrad24-Jan-08 8:39 
GeneralRe: WPF Transparent Window - can it still detect events? Pin
DaveyM6924-Jan-08 11:01
professionalDaveyM6924-Jan-08 11:01 
QuestionShould I do MCSD certification for Framework 2.0 or wait for 3.0? Pin
i_want_to_learn_c#24-Jan-08 7:23
i_want_to_learn_c#24-Jan-08 7:23 
GeneralC# Tool Kit for studio 2008 Pin
bigjoe11a24-Jan-08 6:15
bigjoe11a24-Jan-08 6:15 
GeneralRe: C# Tool Kit for studio 2008 Pin
Ed.Poore24-Jan-08 8:46
Ed.Poore24-Jan-08 8:46 
GeneralProblem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 6:06
NewToAspDotNet24-Jan-08 6:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.