Can anyone tell me the difference between those two commands?

Edit: Thanks for the answers, but I didn't get the clue yet. Here's an example:

test.tex

\documentclass[a4paper,oneside]{mytestclass}
...

mytestclass.cls

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{testclass}[2011/01/30 v0.1 testclass]

or

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{testclass}[2011/01/30 v0.1 testclass]

In both examples the options a4paper and oneside are passed to book. So, I don't see any difference in the result.

-
it is not the same! Try \documentclass[a4paper,oneside,openany]{mytestclass} openany is not valid with \LoadClass. Insert two \chapter commands in the test doc – Herbert Jan 30 '11 at 13:40
Yes, I understand it now. See below. I added it to your answer. Thanks – Thorsten Jan 30 '11 at 13:46

\documentclass[foo,bar]{baz}

inside the baz.cls there can be a

\LoadClassWithOptions{book}% is loaded with options foo and bar

or

\PassOptionsToClass{\CurrentOption}{name}
...
-
Oh, I see. So there's only a difference when I use \LoadClassWithOptions inside a .tex file. When I use one of those commands insde a .cls file I get the same result. Right? – Thorsten Jan 30 '11 at 10:57
No, even if you use it inside a .cls, \LoadClassWithOptions will load the class using the options specified in the \documentclass of the main .tex file. – Juan A. Navarro Jan 30 '11 at 11:16
@Herbert: your code would cause an Two \LoadClass commands error. – Martin Scharrer Jan 30 '11 at 11:22
The question is only if you want to pass the options to the loaded class or not. There is also a command \PassOptionsToClass{..}{...} and both are used inside the baz.cls – Herbert Jan 30 '11 at 11:25
@Herbert, I thought so, but just wanted to point it out for Thorsten. – Martin Scharrer Jan 30 '11 at 11:40

The command

will load the class using the options specified in the main document.

The command

will load the class using the specified options and does not include the options of the main document.

In your example you probably don't see much difference because the options specified in the \documentclass are probably the defaults for scrbook anyway.

But consider this example of a file baseclass.cls:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{baseclass}[2011/01/30 v0.1 baseclass]

\def\funny{Is not funny}
\DeclareOption{funny}{\def\funny{Is funny!}}
\ProcessOptions\relax

Then myclass.cls:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myclass}[2011/01/30 v0.1 myclass]

And main.tex:

\documentclass[funny]{myclass}

\begin{document}
\funny
\end{document}

Even if you specify the funny option, it won't be applied in baseclass. But it will be applied if you use the command \LoadClassWithOptions in myclass.cls.

-
Thank you for your answer. I've got it now. Unfortunately I cannot accept more than one answer. – Thorsten Jan 30 '11 at 13:58

From the LATEX2ε for class and package writers guide:

A LATEX class can load one other class as follows: