08-25-2016 04:53 AM
Hi All.
I am trying to configure a call library function with the following parameters from MSDN
BOOL WINAPI GetConsoleScreenBufferInfo( _In_ HANDLE hConsoleOutput, _Out_ PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo );
For the types HANDLE and PCONSOLE_SCREEN_BUFFER_INFO what should they be set to. These are C++ parameters and there is no documentation of how to use them in Labview. Does anyone know how to set them up??
Thanks.
08-25-2016 06:29 AM
Hello
Usually for handle type you need to use i32 and for Screen_buffer_info I would guess string. Try it and let me know whether it works 🙂
Marcin
08-25-2016 06:43 AM
No that hasn't worked. When I create both the input and the output it creates an in and an out for each. Should there be just one input and one output?
08-25-2016 06:56 AM
I'm not sure but I think it's expected behaviour because the function just needs the refernece for the out parameter. Do you have some error right now or just the behaviour is different than expected?
08-25-2016 07:09 AM
The error code is 1517. Call Library Function Node
08-25-2016 07:42 AM
Can you send some code of your application?
08-25-2016 07:54 AM
The vi is attached. i run a cmd window in the background and then run the vi hoping to get the data from the cmd window.
08-25-2016 08:11 AM
Sorry I missed the VI.
You cannot pass 0 to the handle because it doesn't mean anything. You have to know the handle to the console and I am not sure how to get the handle to the already open cmd window.
Can you maybe call the cmd window directly from LabVIEW? Then I suppose getting handle to it would be easy.
08-25-2016 08:19 AM
In this vi I have called the command window and implement a keypress. is it possible to get the handle from this?
08-25-2016 08:24 AM
Try to use this function:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683231(v=vs.85).aspx
You want to get handle STD_OUTPUT_HANDLE.