From: Tony Johansson on
Hi!

Here I have some text from Microsoft Press(exam 70-536) It says:
"The .NET Framework provides you the ability to both import Win32 functions
using Dll import attribute and you can
also use P/Invoke to make direct calls against Win32 DLLs."

Now when I use P/Invoke I use the DLLImport attribute but what does the book
mean in this text when it says "both import Win32 functions using Dll import
attribute" but this is how P/Invoke is used and then the text says you can
also use P/Invoke to make direct calls against Win32 DLLs.

Does anyone understand what this text actually mean. It seems to me that the
last part of the text is wrong when they say "you can also use P/Invoke to
make direct calls against Win32 DLLs." becuse what they describe here is
P/Invoke.

//Tony


From: Jeff Johnson on
"Tony Johansson" <johansson.andersson(a)telia.com> wrote in message
news:%23GBXlqs5KHA.1932(a)TK2MSFTNGP05.phx.gbl...

> Here I have some text from Microsoft Press(exam 70-536) It says:
> "The .NET Framework provides you the ability to both import Win32
> functions using Dll import attribute and you can
> also use P/Invoke to make direct calls against Win32 DLLs."
>
> Now when I use P/Invoke I use the DLLImport attribute but what does the
> book mean in this text when it says "both import Win32 functions using Dll
> import attribute" but this is how P/Invoke is used and then the text says
> you can also use P/Invoke to make direct calls against Win32 DLLs.
>
> Does anyone understand what this text actually mean. It seems to me that
> the last part of the text is wrong when they say "you can also use
> P/Invoke to make direct calls against Win32 DLLs." becuse what they
> describe here is P/Invoke.

I agree with you, Tony: it sounds like they're saying the exact same thing
two different ways and telling you they're saying two different things. If
this were for a marketing campaign then I could totally believe it was just
weasel-speak, but in an exam it makes no sense whatsoever. I'd be very
interested in hearing how to do these "direct calls against Win32 DLLs," but
I doubt this ability exists as they have made it sound.


From: "Roger" rjpd AT NOnetzeroSPAM DOT on
Hi,
There may be an errata sheet; check that.
Roger


From: Arne Vajhøj on
On 28-04-2010 08:02, Tony Johansson wrote:
> Here I have some text from Microsoft Press(exam 70-536) It says:
> "The .NET Framework provides you the ability to both import Win32 functions
> using Dll import attribute and you can
> also use P/Invoke to make direct calls against Win32 DLLs."
>
> Now when I use P/Invoke I use the DLLImport attribute but what does the book
> mean in this text when it says "both import Win32 functions using Dll import
> attribute" but this is how P/Invoke is used and then the text says you can
> also use P/Invoke to make direct calls against Win32 DLLs.
>
> Does anyone understand what this text actually mean. It seems to me that the
> last part of the text is wrong when they say "you can also use P/Invoke to
> make direct calls against Win32 DLLs." becuse what they describe here is
> P/Invoke.

Two words: lousy book !

Arne
From: Konrad Neitzel on
Hi Arne,

Arne Vajh?j wrote on 28.04.10
in microsoft.public.dotnet.languages.csharp
> On 28-04-2010 08:02, Tony Johansson wrote:
>> Here I have some text from Microsoft Press(exam 70-536) It says:
>> "The .NET Framework provides you the ability to both import Win32 functions
>> using Dll import attribute and you can
>> also use P/Invoke to make direct calls against Win32 DLLs."
>>
>> Now when I use P/Invoke I use the DLLImport attribute but what does the
>> book mean in this text when it says "both import Win32 functions using Dll
>> import attribute" but this is how P/Invoke is used and then the text says
>> you can also use P/Invoke to make direct calls against Win32 DLLs.
>>
>> Does anyone understand what this text actually mean. It seems to me that
>> the last part of the text is wrong when they say "you can also use P/Invoke
>> to make direct calls against Win32 DLLs." becuse what they describe here is
>> P/Invoke.

> Two words: lousy book !

I am just wondering, what book Tony is reading. I found the book "MCTS
Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework:
Aplication Development Foundation, Second Edition" from Tony northrup Not
bad. I simply have the problem, that I do not find any other book from
Microsoft Press about the exam 70-536 and at least in the 2nd edition I do
not find this sentence at all. The book only covers how to interoperate
with COM (Chapter 13). So maybe the first edition was much worse than the
versions, that I have.

So Tony: Which book do you use exactly? I am just curious.

So far I did the Exams 070-536 and 070-433 and the self-paced training
kits was my main source when I prepared myself. So in my opinion, the
books are not "lousy". (But maybe I would recommend to read the book
morein total and also use other sources of documentation - and simply play
around. In this case, Tony simply gave one sentence he found - I could
imagine that he found it in the Overview of a chapter. But the chapter
describes in detail, how something can be done and you get examples with
the book that you can use and modify and play with...

I am quite sure, that you will find errors in any big book. And some are
critical. But taking such a single sentence from a book is simply a shame
in my eyes and can quickly lead to wrong conclusions.

(And no, I have nothing to do with Tony Northrup nor MS Press :) )

Konrad
--
Konrad Neitzel - neitzel(a)neitzel.de
MCTS SQL Server 2008, Database Development