LabWindows/CVI

cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

How do I create a directory within CVI?

How do I create a directory from within CVI?
0 Kudos
Mensagem 1 de 12
7.338Exibições

Creates a new directory based on the specified directory name.

Note:  Only one directory can be created at a time.

/*-------------------- Prototype ---------------------*/
int MakeDir (char Directory_Name[]);

Utility Library\Diretory Utilities
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Mensagem 2 de 12
7.334Exibições

This seems really straight forward, but for some reason adding a call to MakeDir gives this error when I compile:

 

Undefined symbol '_MakeDir@4' referenced in "report.c"

 

However, I have included utility.h. So I'm not sure what the problem is. Also, the project is real-time only. Any ideas?

0 Kudos
Mensagem 3 de 12
6.793Exibições

Maybe CreateDirectoryA might work (according to http://zone.ni.com/reference/en-XX/help/370051K-01/cvirtmodulehelp/windowssdkfuncsinrt/ this function should be available in RT)

For parameter definition see windows sdk help.

0 Kudos
Mensagem 4 de 12
6.749Exibições

I found kernel32_lvrt.lib on my desktop. I couldn't find any header files. How do I go about including this library in my project?

0 Kudos
Mensagem 5 de 12
6.747Exibições

windows.h

put it at top of your includes

0 Kudos
Mensagem 6 de 12
6.742Exibições

Thanks, I'm having trouble finding documentation for the sdk library.

0 Kudos
Mensagem 7 de 12
6.735Exibições

in CVI: Help/Windows SDK

 

What i forgot to say: you must have Windows SDK installed with CVI.

 

Here an extract:

 

BOOL CreateDirectory(
  LPCTSTR lpPathName,                         // directory name
  LPSECURITY_ATTRIBUTES lpSecurityAttributes  // SD
);

 

You can set lpSecurityAttributes to 0 for RT systems.

 

 

 

 

0 Kudos
Mensagem 8 de 12
6.731Exibições

So am I to gather that the utility.h and/or the MakeDir method is not RT safe?  Is this why it does not work?

0 Kudos
Mensagem 9 de 12
6.641Exibições

I don't know if it is safe or not. I only know that this function is not contained in the RT library.

 

Maybe a National Instruments representative can answer this question.

 

In the meantime you can use the SDK funktion.

... and while there is a workaround there is no need to change anything Piscadela do Smiley

0 Kudos
Mensagem 10 de 12
6.618Exibições