Click here to Skip to main content
15,896,207 members
Everything / CLI

CLI

CLI

Great Reads

by Greg Utas
Automating help, validating user input, running scripts...
by paladin_t
A guide about how to mix native and managed code in one solution
by matt warren
How the .NET CLI tooling runs your code
by Fedor Dzjuba
Client and a WebAPI to execute MDX query against SSAS and display a resulted cellset in a pivoted grid form with Axis neatly arranged in a hierarchical and grouped manner.

Latest Articles

by optiklab1
Exploring world of NFTs and blockchain while prototyping wallet CLI application with efficient data structures using C# and .NET Core
by Bhargav Technical Lead
Angular migration to version 16
by Greg Utas
Automating help, validating user input, running scripts...
by Fedor Dzjuba
Client and a WebAPI to execute MDX query against SSAS and display a resulted cellset in a pivoted grid form with Axis neatly arranged in a hierarchical and grouped manner.

All Articles

Sort by Updated

CLI 

29 Jan 2024 by optiklab1
Exploring world of NFTs and blockchain while prototyping wallet CLI application with efficient data structures using C# and .NET Core
9 Jun 2023 by Александр Романеев
I run the terminal, But I do not understand which commands work. How to write correctly, so I exit the window or better the "help" command so I the allowed commands. Compiled successfully! You can now view react-app in the browser. Local: ...
9 Jun 2023 by Andre Oosthuizen
As Javascript is client side based, you will probably need node.js for your serverside. That being said, here are some shortcuts for Javascript terminal usage - 1. Installing - Regular: npm install Shortcut: npm i 2. Testing - Regular: npm...
17 May 2023 by Bhargav Technical Lead
Angular migration to version 16
12 Nov 2022 by PartisanIsaac
I was making a small block drawing package with Node.js, and i was tinkering with it, but at the exact moment i put a ANSI Color code, it started to break. Before: Image[^] After Image[^] The reason that makes it break is that all the...
12 Nov 2022 by Dave Kreskowiak
Quote: The reason that makes it break is that all the characters i use to make the ANSI codes work are being treated as just normal characters when i use the string .length property. That's because, in the terms of a string, they ARE normal...
11 Nov 2022 by OriginalGriff
That's because ANSI escape sequences are just that: sequences. They have a common format: They start with an ESC character, and the following character either completes the sequence are indicates a Control Sequence if is is an open square...
18 Sep 2022 by Death Smoke
#pragma once #include using namespace std; namespace Project1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace...
30 Aug 2022 by n.deny
i have a program to read data from serial port appsto port R L S F 1 CR LF port to apps R L S F 1 CR LF port to apps L D S E 3 CR LF READ data port to apps L D E D 5 CR LF apps to port R L E E 3 CR LF port to apps R L E E 3 CR...
30 Aug 2022 by Richard MacCutchan
Your code assumes that the remote device will send all its data in a single burst according to your read command. However this is not how serial I/O works. It is an asynchronous process and characters need to be captured as they are received in...
30 Aug 2022 by CPallini
Quote: serialPort1->Write(dateS, 0, dateS->Length); cli::array^ byts = gcnew cli::array(dateS->Length); serialPort1->Read(byts, 0, dateS->Length); Just a wild guess (you post omits significant details): you are...
28 Jun 2022 by code_pop
Hi all. I'm using the C++/CLI dll on the C# WinForm project. To pass from the native code's exception message to C#, I have written the code as below. #include "pch.h" #include "ClassLibrary1.h" using namespace ClassLibrary1; void...
7 Jun 2022 by gsegria
I am investigating how to find out physical address from start offset to end offset. For example: 1) There is a 70GB storage. (F:\) 2) There are four 17GB files. 17GB-1.bin, 17GB-2.bin, 17GB-3.bin, 17GB-4.bin 3) copy 17GB-1.bin, 17GB-2.bin,...
12 Mar 2022 by k5054
You need to give a command for sudo to execute: # sudo with no command given [k5054@localhost ~]$ sudo -S usage: sudo -h | -K | -k | -V usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user] usage: sudo -l [-AknS] [-g group] [-h host]...
9 Mar 2022 by Greg Utas
Automating help, validating user input, running scripts...
9 Jan 2022 by WantToLearn1
Made a GUI with Visual Studio. Trying to pass a string to another cpp file but it's difficult. I have tried extern std::string but it's always empty for the measure.cpp file. Extern int is working fine. Then I tried to make function inside to...
9 Jan 2022 by CPallini
In order to call the path() method in your measure.cpp source file, you need to: include form.h in measure.cpp. call it on a instance to the MyForm class (because it is a method, not a standard function). In order to get better help, you...
16 Sep 2021 by sam_lima10@yahoo.com.br
My regards to all: Does anyone around here know if it's possible to use some Win32 functions in C++ CLI? I'm interested in using them, mainly this one: TextOut ( hdc, 140, 10, L"Help if possible", 20 ); What I have tried: ...
16 Sep 2021 by CPallini
Have a look at Calling Native Functions from Managed Code[^].
18 Jul 2021 by wifinut
I'm trying to add a speed test to my BASH script. I know you can install speedtest-cli on the host, but this is not an option. I'm looking for options perhaps using the CURL command. What I have tried: I tried using a CURL command to obtain the...
18 Jul 2021 by Daniel Pfeffer
Working backwards from the numbers that you give, we get 1 block = 100Mb / 22355 = 4473 bits. This looks close to a 4 Kb (i.e. 512 byte) block size. Adding various header and framing bits make the correspondence even better. I expect that you...
16 Jun 2021 by Member 15248812
Hi guys, my aim is to capture the screen of a windows form using c++/cli. Below is the code to capture the window, however, it is in C#. What changes do I have to make to the code for it to work in c++? Graphics myGraphics =...
16 Jun 2021 by OriginalGriff
You are treating the class name as a pointer by using the -> operator to dereference a static member method. Try this: Graphics^ memoryGraphics = Graphics::FromImage(memoryImage); If you had gone to the MS documentation and selected C++ as the...
1 May 2021 by dj4400
I am looking for an example or a walkthrough for creating a c++/cli wrapper for a c# dll to be used (loaded statically/dynamically) in an unmanaged c++. I found examples of a wrapper for the other way around (c++ dll to be loaded in c#) but none...
1 May 2021 by OriginalGriff
See here: Calling C# .NET methods from unmanaged C/C++ code[^]
2 Apr 2021 by wifinut
I'm looking for a method to obtain my provisioned ISP bandwidth via shell script. To be clear, I'm not looking to do a speed test. My goal is the following: 1. Get my provisioned bandwidth (up/down) 2. Run a test to obtain the percentage of...
2 Apr 2021 by Dave Kreskowiak
The only way to get your bandwidth is a speed test. There is no information stored on your machine or any standard method on the internet to get your provisioned bandwidth.
6 Jan 2021 by Demetri K.2
I've got a test task that requires to write a basic app with CRUD functionality (a list of visitors), but all the user input and app output has to go through the command-line interface. Everything has to be done in raw php. If anyone could...
6 Jan 2021 by Richard MacCutchan
You can learn about readline at PHP: readline - Manual[^]. Search from there for the print command to send your output to the console.
2 Jun 2020 by MTeefy
Hi, We are converting a VB6 GUI application that uses C++ for it's backend to VB.net front end. We are also using C++/CLI as the interface. In the C++ the original code was passed from VB6 as Public Type Npat_Stat Chan As Byte Con_stat...
2 Jun 2020 by KarstenK
This is a tricky issue and best is to avoid the pitfalls like handling strings not properly. They arise because VB 6 is some legacy language and so to be handled with much care. And: VB.net works completly different, a bit more like C#. I...
25 Apr 2020 by OriginalGriff
The first problem is that DisplayHelloFromDLL is an instance method of the test class - which means that just like the C# equivalent: public class test { public void test() { printf("This is default constructor"); ...
25 Apr 2020 by KarstenK
Your import statement is missing some important details. And dont use the full path for the import but locate the dll in the directory of the app. Read my article and code about C# interoperbility Calling All Stations and compare the difference...
25 Apr 2020 by Member 14686752
I have C# as my front end application and I want to call c++ dll from my c# but I am getting error. I am posting my code here please help me out how to resolve this: Program.cs using System; using System.Runtime.InteropServices; using...
14 Jan 2020 by Richard MacCutchan
I just tried your code and it works fine. You need to provide more details of your exact code and environment.
14 Jan 2020 by Piraisudan
I have a win32 project, I am calling my exe using following command in command prompt. "MyApp.exe /Print" If I execute above in command prompt, I want to display "Welcome to MyApp" in the same command prompt window. I am able to get the given command line using CWinApp, but I cannot able to...
14 Jan 2020 by _Asif_
It's easy and a good example can be found here Visual C++ Enable Console - Stack Overflow[^] Do a little search and you will find plenty of examples more.
14 Jan 2020 by W Balboos, GHB
If cout fails you, take the extreme route. Do a stream write to stderr. I haven't done the above since my DOS days but the typical rule was that both stdin and stdout (and thus, possibly cin and cout, for you) can be redirected but stderr could not.
7 Jan 2020 by Fedor Dzjuba
Client and a WebAPI to execute MDX query against SSAS and display a resulted cellset in a pivoted grid form with Axis neatly arranged in a hierarchical and grouped manner.
16 Dec 2019 by Rick York
No, one should not call main from anywhere. It is the designated entry point for CLI programs. For GUI programs in windows the entry point is WinMain. This is a bit confusing. How is it you have a button in a window with a CLI program? If you want to learn how to use OpenGL in a WinForms...
16 Dec 2019 by SIDHARTH S
Is it possible to call the function int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH); glutInitWindowSize(500, 500); glutInitWindowPosition(100, 100); glutCreateWindow("Window"); glutDisplayFunc(display); ...
5 Dec 2019 by LorenzoGorza
Issue to link c++ opencv project with c# console app. What I have tried: I try to develop a wrapper to link a library of c++ class of image processing methods to a c# console project. In the c++ console app one I've create a class with the opencv include in its header #include...
4 Apr 2019 by Member 14150165
I'm new to managed C++, dealing now with a C++/CLI project which involved function calling from native DLL for results to be displayed via WinForm. An expected exception is encountered when calling function from native DLL due to missing equipment for the project. However, instead of...
26 Oct 2018 by rushfive
.NET Command Line Parser, utilizing object trees for command configurations
7 Aug 2018 by Member 13703287
C++/CLI Function I am generating Hash key using C++/CLI and Sending Data and Hashkey Over network to Other Application which is Java But Java Application HashKey Generated is different. Any Idea where i am going wrong? Thanking in Advance. char* EncodeData(char* ap_key, char* ...
13 Mar 2018 by ashish121095
I am new to C++/Cli so bare with me. so, I have node class (page3_node.h), page3.h (form page) and page3.cpp which consists implementation of page3_node.h. my problem is I am trying to access methods of page3_node.h into page3.h but I am not able to do it. Any help is greatly appreciated. ...
19 Feb 2018 by phil.o
Your problem does not seem to be in the structure declaration, but rather where you try to use it. The code you showed does not hold any cfg identifier. Find this identifier in your code, you most likely forgot to terminate one of your statements with a semicolon.
19 Feb 2018 by Vishal Bhatia0112
Hello All, It's an C++/CLR project. I have below structure in my header file: value struct CONFIG { System::String^ Exch_Feeds; System::String^ Exch_Type; System::String^ Feeds_Type; int Feeds_port; int Max_Users; int IML_port; System::String^ Interface_IP; System::String^...
24 Jan 2018 by VR Karthikeyan
Hello, I hope the following discussions will help you, 1. Is there a performance difference between WPF and Winforms? - Stack Overflow[^] 2. Performance | Microsoft Docs[^] 3. WPF vs Windows Forms | Tales from a Trading Desk[^]
24 Jan 2018 by Vishal Bhatia0112
Hello Everyone, Namaste. We are starting to build an application whioch will be having more gridview controls. We are opting for CLR or WPF, which one is better in my case (For Gridview). And is WPF still lacking in grid forms? What I have tried: Still more interested in WPF cause of it's...
19 Nov 2017 by Maximilien
I have a ref class to hold data in a Managed C++ DLL. The type (Stuff::Manager) is from a 3rd party .NET DLL. Question is in the comment in the code block. ref class MyDataClass { public: static Stuff::Manager^ m_Manager; /// ... } With pseudo-code ... void f() { Stuff::Manager^...
19 Nov 2017 by Mikhail Semenov
manager is a pointer and since it's managed .NET code you don't have to worry about disposing it. It will be done automatically.
6 Nov 2017 by Member 13147452
how can i send and receive json data between C# and C++. i have a json data in my c# code and i need to send the data to c++ and as a replay i need to send another json data to c#. could some one please explain how can i do this using C++/CLI wrapper. What I have tried: i don't have a clear...
6 Nov 2017 by KarstenK
When it is in the same app than you best use C# interop and make a call by using the jason as string parameter. Read my article and code Calling all stations. If it are different apps it gets a bit difficulter. Writing an temporary file or shared memory is best for on the same machine.
31 Aug 2017 by Member 13387945
GitHub - mabe02/lanterna: Java library for creating text-based GUIs[^]
31 Aug 2017 by Member 13387945
I was hoping someone could introduce me to a Java Graphic User Interface Command Line library. Something like nano,vi or a typical (windowsXP/RedHat no GUI install) sort of frame work. Colors and everything. I can use arrows keys to change values etc. I don't want to System.out.println() and...
31 Aug 2017 by CPallini
Some info here: Interactive Console Applications in Java[^].
8 Jan 2017 by Gun Gun Febrianza
Yesterday i was read book .Net IL Assembler, i know how to code IL Assembly and produce managed code(exe or dll) using ilasm. we can create console based application using IL Assembly, My question is how to make Windows Form Application using ilasm? i am curious how to make simple form with...
8 Jan 2017 by OriginalGriff
It's not as simple to do as a console app, but it's possible - a lot of work though.What I'd suggest you start with is by creating a basic WinForms app in C# - one button, one text box: press the button and the text box content goes into a MessageBox. Build it and look at the IL that it...
15 Dec 2016 by ergohack
Tired of the same old Windows Logon/Shutdown screen? I use a symbolic link rotation utility to cycle through a bank of backgrounds.
10 Sep 2016 by matt warren
How the .NET CLI tooling runs your code
11 Aug 2016 by ricksmitchina
Hi... I'm new in the world of c++, im creating a c++ CLI form with a listview on which is populated at runtime in the "Load" event... now i hav come so far as to make the list able to show a message box when i double click the listview item...but heres my question....How do i get the message...
11 Aug 2016 by Richard MacCutchan
See ListView.SelectedItems Property (System.Windows.Forms)[^].
11 Apr 2016 by devender_t
I am trying to expose a Managed Function to Unmanaged Code using C++/CLI wrapperpublic:array^ CallingBrownianManagedCodeTemp(){ int numPaths = 100; int dimension = 3; double time = 30; int seed = 1; double stepSize = 1.0 / 12.0; int scrambling = 0; ...
29 Mar 2016 by Maddie from Dartford
Hello,I have two c++ lib file which I want to link in my Managed c++ application. While liking it gives 56 link error and I am able to figure out how to resolve these errors. Here are few error details:Quote:error LNK2005: "private: static class std::locale::_Locimp * __cdecl...
29 Mar 2016 by Sergey Alexandrovich Kryukov
Please see my comment to the question.C++ is unique language in this respect. You can use regular P/Invoke .NET API, but it's really beneficial to use mixed-mode projects where you can freely mix managed + unmanaged. Please see:Calling Native Functions from Managed Code[^],Using C++...
6 Mar 2016 by FrostedSyntax
How to create batch files that make navigating the filesystem in the command prompt a breeze.
1 Feb 2016 by CPallini
Let me search for a tutorial... "C++ Tutorial: Using of BackgroundWorker Component in C++/CLI | Free source code, tutorials and articles"[^].
1 Feb 2016 by Member 10657083
How does one implement the background worker in C++, for something like a cpu meter that runs constantly.
30 Jan 2016 by OriginalGriff
Sorry to hear that - but you might have got an answer if you had had a little patience, as I suggested when I deleted your question that consisted of:Recently submitted question IS IMPORTANT, TO ME. But all the times I have asked for help, I have not gotten any replies with the answer. Maybe...
30 Jan 2016 by Member 11856129
I didn't rush anyone. I got an immediate smart-ass reply from Mehdi Gholam. It's obvious you don't want to help me, because you already deleted my question. Take me off your mailing list. I'M THROUH WITH THIS WEBSITE.
17 Jan 2016 by Prakash1206
I am using LibVlc.Net to embed Vlc in winforms using C++/Cli.Dragged a 'VlcPlayerControl' Component from ToolBox to winforms UIFollowed this tutorial.There are no Build errorsdss, but i see a run time error when i click on Play button.An unhandled exception of type...
10 Nov 2015 by Kornfeld Eliyahu Peter
One of these will do the work for you...https://msdn.microsoft.com/en-us/library/ttyxaek9(v=vs.110).aspx[^]https://msdn.microsoft.com/en-us/library/744y86tc(v=vs.110).aspx[^]
9 Nov 2015 by Maddie from Dartford
Hello,I have gone through many article but still looking for answer of my question. I have written c++ wrapper class which has one function like this:void ManagedWrapper::ReadFile(String^ licFile){ ReaderClass reader; unsigned char readFile[5000]; reader.readLicFile(readFile);...
30 Oct 2015 by Jammes_Ca
Hello i create a program with OpenCv that dispaly video. the program is a consolea application hat lunch a window that show the video.Now i want to display the video on a picturbox.Could you help me please.i work with c++/CLIthe code is here#include #include...
27 Oct 2015 by Sergey Alexandrovich Kryukov
I did not see your search, but you either looked in wrong place, and, most likely, used too narrow search criteria. If you are using C++/CLI, the article or answer using any CLI language would suite you; note that most publications are written using C#. Also, you need to understand that...
27 Oct 2015 by KarstenK
You must fetch the image from the camera and display it on a GUI. Here is an outstanding article CXImage which handles a lot of image processing tasks.
27 Oct 2015 by Jammes_Ca
Hello, i want to create a GUI with c++/cli to display video from an embedded cameraI didn't find any article who speak about that.Could you help me please.http://www.bdspeedytek.com/product/jpeg-color-camera-uart-ttl-interface-ov528-chip/[^]
20 Oct 2015 by KarstenK
I have written an article about that issue, which you might had found if you had searched a bit. Or here is anothter beginners article.
20 Oct 2015 by Jammes_Ca
Hello i want to create a c++ dll and call it on a c# project. i saw a lot of video and tutorial but i did'nt find the solution.i want to make a dll of this project Joystick Driver Project[^]and use all thos function on a c# project Please help
17 Oct 2015 by Jammes_Ca
Thanks for your replay, but me i want to program that in C++/CLI not in c# :)could you make me an applicatio, with c++/cli that rotate an image from 180 to -180 Please
16 Oct 2015 by Sergey Alexandrovich Kryukov
It's a bad idea to rotate anything in PictireBox. You need to rotate image, not control, which won't help you at all, will only add hassles and waste some resources giving nothing in return. Instead, render the image directly in your control, which could be a custom control or even something...
16 Oct 2015 by Richard MacCutchan
Please post your question in the forum at the end of the article.
16 Oct 2015 by Jammes_Ca
Hello i'm a beginer on c++/cli, i want to make a program that rotate an image in a picturboxe, i see an exemple in c#, i want to program it on cpp/cli but i had errors in my programe, can you help me please the exemplei n c#...
13 Oct 2015 by Sergey Alexandrovich Kryukov
First of all, please see my comment to the question.If those C++ projects are yours and you have the source code, the best way to create a CLI wrapper would be migrating your projects from C++ to C++/CLI. This way, you can create mixed-mode modules (managed+unmanaged) of dual purpose: they...
13 Oct 2015 by Maddie from Dartford
I have three C++ projects under one solution file and each project has multiple C++ files. I need to write C++ CLI wrapper so C# application can access functionalities of C++ classes.I have created managed dll project with one class which is mocking all functionalities of one C++...
13 Feb 2015 by Vladimir Svyatski
I'm going to show you some not quite evident things if you're about to write a C++/CLI application.
26 Oct 2014 by Mr. xieguigang 谢桂纲
The idea of hybrids the R script and my shellscript is awesome, and hybrid the shellscript with R can extends the function of my script and I also can write two type of the programming language both in one script file. Incredible thing! Right?
9 Apr 2014 by gaminn
In Visual Studio Express 2013 I have an executable C++/CLI project. It contains main.cpp, Class.h and Class.cpp file. I'm getting "error C2011: N::Class : class type redefinition". Why and how to fix it?//main.cpp#include "stdafx.h"#include "Class.h"int main(array...
9 Apr 2014 by Sergey Alexandrovich Kryukov
In the code fragments you show here, you are not redefining anything. Moreover, you don't have the definition of the class N::Class, not even a declaration of it is shown. The class Class is a different class, Usb::Class, it does not create any name clashes. That is, instead of showing two...
3 Apr 2014 by Sergey Alexandrovich Kryukov
For this very application, it's quite simple. Instead of autoruns.exe, just use autorunsc.exe (a console-only version of autoruns). To collect the output from some console of some application using the console, use System.Diagnostics.Process.Start, redirect StandardOutput (and, just in case,...
3 Apr 2014 by Member 10722835
Hi Coders,Do you think it is possible for a programmer to write a program/plugin to get an output from a software task. Let me explainFor instance autoruns from sysinternals of microsoft outputs are displayed inside the software's GUI. So what I was thinking is writing and making some kind...
24 Feb 2014 by Member 2036792
Well, not always. Processes behave differently if they intend to write to console. ftp.exe, for example will just not write anything (except errors) if it can't WriteConsole.
17 Jan 2014 by bling
Solution 1 works as long as the child process doesn't manipulate the console API directly.
31 Dec 2013 by Member 2036792
Hello!I have a parent process that starts a child process, who then writes to its inherited stdout handle.Perhaps think of the parent process as a cygwin shell and the child process as nano or something. I want to monitor the input / output of nano. Cygwin doesn't necessarily see the...
28 Nov 2013 by KarstenK
The eventhandler shoul look like thisstatic void OnSpeechRecognized(object sender, SpeechRecognizedEventArgs e)read here from more information http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.speechrecognized(v=vs.110).aspx[^]