1, I have a c + + header file, want to make c # call, do not know to have ace to help me get the c + + header file, help me to convert OCX, or c # class, or DLL, let c # can be called directly, below is a c + + source code,
2, do a photo software, control the nikon DSLR photo, have had experience, I below the SDK inside the function of the very few, who has complete functions, can be secondary development, can share a?
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
//note: when using the SDK camera aperture need transferred to the largest,
# # ifndef _CC7Dll_//We only want to be included once
# define _CC7Dll_
//initialize camera
//return values: 0 - failure, greater than 0 - success, - 1 - didn't find CC7Base. DLL
Extern "C" _declspec (dllexport) int InitCam ();
//cancellation of camera
Extern "C" _declspec (dllexport) void UnInit ();
//open the camera
//return values: 0 - failure, 1 - successful,
Extern "C" _declspec (dllexport) int OpenCam ();
//photo blocking function
//the photo finish did not return to,
//return values: 0 - failure, 1 - successful,
Extern "C" _declspec (dllexport) int the Capture ();
//image data acquisition function
//take photos after a successful call
//ImgData need to apply for memory, function is only responsible for copying data, the maximum resolution image memory can apply for to 20000000
//len returned image data length
//return to image width width
//height return image height
//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int GetImg (unsigned char * ImgData, ULONG & amp; Len, int & amp; Width, int & amp; Height);
//set the gain
//the Value input range: 0-23
//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int SetGain (int Value);
//set the exposure time
//the Value range of input: determined according to the GetExposeArray access list
//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int SetExpose (int Value);
//get exposure time list
//Buff list data
//BuffLen data length
//the return value: 1-0 - failed
/* example:
TimeList=gcnew System: : Collections: : Generic: : List
{
Char * psStr=(char *) (buff + I);
//System: : String ^ ss=psStr;
TimeList - & gt; Add (gcnew System: : String (psStr));
I +=strlen (psStr) + 1;
}
*/
Extern "C" _declspec (dllexport) int GetExposeArray (char * Buff, int & amp; BuffLen);
//set the brightness
//the Value input range: 0-18
//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int SetBrightness (int Value);
//set the image size
//the Value 1 input range (2464 * 1632), 2 (3696 * 2448), 3 (4928 * 3264)
//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int SetImgSize (int Value);
//set the camera automatic correction
//the Value 0 - no correction, calibration
1 -//the return value: 1-0 - failed
Extern "C" _declspec (dllexport) int SetAutoDistortion (bool Value);
//histogram optimized algorithm
//8-bit BMP graph data
//whiteLevel white level 0-255
//blackLevel black level 0-255
//Src the source image data 8-bit BMP graph data
//Dec target data memory 8-bit BMP graph data
//width image width
//height image height
Extern "C" _declspec (dllexport) void MakeLUT8Bit (int whiteLevel, int blackLevel, unsigned char * Src, unsigned char * Dec, int width, int height);
//get the camera serial number
//cache the length must be len & gt;=20 char * SN for serial number cache
//in OpenCam function complete access to the serial number after
Extern "C" _declspec (dllexport) bool GetCamSN (char * SN, int len);
#endif
CodePudding user response:
Head into a DLL file? You in this line of thought is very advanced the header files you should look at the situation is itself to a dynamic library call statement, you can call the dynamic library in c # is to realize the want,