Subj : Re: borland equivalent of #pragma pack (2) is? To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Sat Feb 14 2004 09:31 pm Jeff Kish wrote: >On Fri, 13 Feb 2004 16:42:33 -0800, Bob Gonder >> >>The command text is Unicode, no? (LPWSTR) >>Did you convert it to plain STR before sprintfing it? >>Or did you use the windows version? >> >> wsprintf( str, "%ls", atenum.Command ); >> >> >I know the case was wrong.. >Well here is the sprintf and code.. it blows up on the sprintf, and >the data in the command looks funny when I inspect it so I figured >that the alignment was off.. > >i tried this: >sprintf( gooddata, "%8lu %.70S\n", pJob->JobId, pJob->Command ); >but it blew up. I still see 2 possibilities. 1) I think your need a lowercase L in front of the S. 2) Are UniCode and Wide always the same thing? I can't even get NetScheduleJobEnum() to execute right now. So I can't see whatever it is you're seeing for Command. Maybe a Hex dump of the values at Command? .