Hi All, I am a newbie to .NET and have a possibly simple doubt. How can I invoke .NET functionality from C code? Something like reverse JNI. Thanks in advance for the help.
novicedude
Posts
-
Invoking .NET from Native C -
Executing a c++ program in .netHi, I am new to .Net & have been using visual studio 6 for a long time. Now how do i compile & execute a simple Hello world C++ program in visual studio .net as the build button remains disabled. Thank You.
-
Changing From Dialog to TabHi, I have created an application which consists of dialog boxes corresponding to the various options. Presently i call each dialog box on the click of a particular button. Now i want to use a tabbed structure instead of buttons. How can i do that. One possible way is to change the base class of the dialog objects from CDialog to CPropertySheet & then use the AddPage api to display the dialog. But how do i redefine the base class?
-
VC++ Class StructuresHi, I am developing a client server application with vc++. I have the following 3 main classes * PayrollDlg - This is the main dialog box * WageDlg - This dialog box is accessible thru PayrollDlg * AbsSocket - This class manages the networking aspect i.e creating a socket & sending , receiving data. Now i need to create an object os AbsSocket that can be accessed from both PayrollDlg as well as WageDlg. Where do i declare this object to achieve this. If i declare the AbsSocket object in either PayrollDlg or WageDlg classes it becomes local to that class. What i actually want to know is where is the main() function as if i declare the AbsSocket object in this main it can be accessed anywhere right?
-
edge detection using cI am attempting to code a c program to detect edges in a 8 bit bmp images. Firstly i read the color palette into an array then take 3x3 sections of the array and multiply them with standard masks (like sobel's masks) to obtain the changed color palette values.This approach is however not working & the desired output is not shown.Could somebody help me? Novicedude
-
Question about playing .wav files using mmio functionsI am trying to code a program to play wave files using the low level functions provided by VC++ such as the "MMIO" functions. I encountered problems in "waveOutOpen","waveOutWrite","waveOutPrepareHeader" functions. A handle was passed as the first parameter to each of the function calls.The error i got was "waveOutOpen cannot convert parameter one from void ** to struct HWaveout_ **".the same error was shown for each of the other function calls(i.e for waveOutPrepareHeader etc),subsequently i typecasted the handle as (HWAVEOUT*).While this caused the errors to stop the program did not run as the header was not being prepared. The code is as shown below. HANDLE hWaveOut; MMRESULT ReturnCode = waveOutOpen((HWAVEOUT*)&hWaveOut,WAVE_MAPPER,(tWAVEFORMATEX*)&PCMWaveFmtRecord,NULL,NULL,NULL); if(ReturnCode) { AfxMessageBox("Could Not Open Wave Device",MB_OK | MB_ICONSTOP,NULL); return(FALSE); } ReturnCode=waveOutPrepareHeader((HWAVEOUT)&hWaveOut,&WaveHeader,sizeof(WaveHeader)); if(ReturnCode) { AfxMessageBox("Could Not Prepare Header",MB_OK | MB_ICONSTOP,NULL); waveOutClose((HWAVEOUT)hWaveOut); return(FALSE); } ReturnCode = waveOutWrite((HWAVEOUT)&hWaveOut,&WaveHeader,sizeof(WaveHeader)); if(ReturnCode) { AfxMessageBox("Error Writing to Wave Device",MB_OK | MB_ICONSTOP,NULL); waveOutClose((HWAVEOUT)hWaveOut); return(FALSE); } Could anyone let me know how to proceed? novicedude