If you want to call notepad using only the commandlineparameter you must pass Null in the ApplicationName parameter.
In your case ApplicationName isn't Null but instead an empty string which makes CreateProcess think that you want to launch Application "" with "notepad.exe" as commandline arguments...
These should be valid variations...
res = CreateProcess (Null,"notepad.exe", NULL,NULL,TRUE,NULL,NULL,NULL,StartInf, ProInf)
res = CreateProcess ("c:\windows\notepad.exe","", NULL,NULL,TRUE,NULL,NULL,NULL,StartInf, ProInf)
In your case ApplicationName isn't Null but instead an empty string which makes CreateProcess think that you want to launch Application "" with "notepad.exe" as commandline arguments...
These should be valid variations...
res = CreateProcess (Null,"notepad.exe", NULL,NULL,TRUE,NULL,NULL,NULL,StartInf, ProInf)
res = CreateProcess ("c:\windows\notepad.exe","", NULL,NULL,TRUE,NULL,NULL,NULL,StartInf, ProInf)