000
28.06.2005, 15:21 Uhr
Chef-Koch
|
Hallo liebe Programmier Gemeinde ,
Ich habe ein problem mit einem Programm . Es funktioniert ja schon so wie ich will , baer es fehlen meiner Ansicht nach noch ein paar Extras . Z.B ertellt mein Prog. eine .txt Datei, ich will aber dass es diese ofort öffnet (ausführt) . Und ich will auch ein extra Ordner dafür erstellen.
Ich hab mich mal per "Suche" erkundigt aber dann kam sowas wie .. "ja probiers mal CreateDirectory ..." "... ahaj jetz ist alles klar danke ...." <- naja ich hab darauf mal im Index gesucht was es dazu gibt , aber ich hab den müll ned verstanden
CreateDirectory The CreateDirectory function creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory. Note that CreateDirectory does not have a template parameter, while CreateDirectoryEx does.
BOOL CreateDirectory( LPCTSTR lpPathName, // pointer to directory path string LPSECURITY_ATTRIBUTES lpSecurityAttributes // pointer to security descriptor ); Parameters lpPathName Pointer to a null-terminated string that specifies the path of the directory to be created. There is a default string size limit for paths of MAX_PATH characters. This limit is related to how the CreateDirectory function parses paths.
Windows NT: An application can transcend this limit and send in paths longer than MAX_PATH characters by calling the wide (W) version of CreateDirectory and prepending "\\?\" to the path. The "\\?\" tells the function to turn off path parsing; it lets paths longer than MAX_PATH be used with CreateDirectoryW. However, each component in the path cannot be more than MAX_PATH characters long. This also works with UNC names. The "\\?\" is ignored as part of the path. For example, "\\?\Cmyworld\private" is seen as "Cmyworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\bill_g_1\hotstuff\coolapps".
lpSecurityAttributes Windows NT: Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect. Return Values If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks Some file systems, such as NTFS, support compression or encryption for individual files and directories. On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent directory.
Windows NT: An application can obtain a handle to a directory by calling CreateFile with the FILE_FLAG_BACKUP_SEMANTICS flag set. For a code example, see CreateFile.
Windows CE: The lpSecurityAttributes parameter is ignored and should be set to NULL. Windows CE does not support security attributes.
For more information, see Accessing Persistent Storage.
QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Requires version 1.0 or later. Header: Declared in winbase.h. Import Library: Use kernel32.lib. Unicode: Implemented as Unicode and ANSI versions on Windows NT.
ok ich kapiers schon al bissl also dass: mal schreiben muss bool CreateDirectory( ...) aber zu den Klammern : wenn ich LPCTSTR hin schreib sagt der dass die Variable nicht daklariert is ... wozu brauch ich diie dann?? und nomml was : Was bringen Zeiger?!?! überall wo ich schau heißt es . jaaa die sin voll wichtig und so , aber des Einzigste was ich kapiert hab is , dass sie auf den Speicher einer Variablen zeigen ja und?!
DAAAAANKKEEEEE dass ihr meinen soo langen post mich genauso langen antwortet |