Click here to Skip to main content
15,908,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: HELP!!! Entry Point Was Not Found [modified] Pin
Eddy Vluggen23-Mar-09 4:00
professionalEddy Vluggen23-Mar-09 4:00 
GeneralRe: HELP!!! Entry Point Was Not Found Pin
dataminers23-Mar-09 6:22
dataminers23-Mar-09 6:22 
AnswerRe: HELP!!! Entry Point Was Not Found Pin
Mbah Dhaim23-Mar-09 6:47
Mbah Dhaim23-Mar-09 6:47 
QuestionOne of the column in the gridview has a link button..when i click on it then the file attachemnt has to get downloaded which is already saved in the database. Pin
grkrishna23-Mar-09 2:32
grkrishna23-Mar-09 2:32 
AnswerRe: One of the column in the gridview has a link button..when i click on it then the file attachemnt has to get downloaded which is already saved in the database. Pin
dan!sh 23-Mar-09 2:41
professional dan!sh 23-Mar-09 2:41 
AnswerWhy have you wrote more for the subject then you have for the actual post? anyway the complete source code for your requirements is as follow: Pin
musefan23-Mar-09 2:47
musefan23-Mar-09 2:47 
QuestionSource code arranger/formatter Pin
Martin Hart Turner23-Mar-09 2:18
Martin Hart Turner23-Mar-09 2:18 
QuestionError while calling C++ DLL in C# Pin
Amit_T23-Mar-09 1:21
Amit_T23-Mar-09 1:21 
I am calling a C++ dll in C# code. The called function takes a 2 dimesnsional array but gives the follwoing error when the values are to be printed from the C++ code. The code snippets are attached below.
-------------------------------------------------------------------
"An unhandled exception of type 'System.AccessViolationException' occurred in Utility.exe

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

-------------------------------------------------------------------
The DLL import function is as follows:-
[DllImport("ClusteringDLL.dll", EntryPoint = "?getdata@CClusteringDLL@@QAAXQAPAM0H@Z", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]

public static extern void getdata([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, SizeConst=4)] float[,] dx, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, SizeConst=4)] float[,] dy, int it);

-----------------------------------------------------------------

The C++ function is as follows:-
CLUSTERINGDLL_API void __cdecl CClusteringDLL::getdata(float *dxm[], float *dym[], int s) //function for getting the data from user
//CLUSTERINGDLL_API void __ CClusteringDLL::getdata(float (&dxm)[Size][2]) //function for getting the data from user
//CLUSTERINGDLL_API void __thiscall CClusteringDLL::getdata(int dxm) //function for getting the data from user
{
std::cout<<"Enter the number of clusters";
std::cin>>numClust;
std::cout<<std::endl<<"Enter the number of points";
std::cin>>numPoints;
if (numPoints==numClust)
{
std::cout<<std::endl<<"Reenter the number of points as the number of points=number of clusters";
std::cin>>numPoints;
}
for(int i=0;i<=s;i++)
{
std::cout<<std::endl<<"X Co-ordinate:"<<dxm[i][0];

}


}
---------------------------------------------------------------------
The code throws the error when one tried to print the X co-ordinate as shown on the last line of the code.
-------------------------------------------------------------------

And the calling function in main is as fiollows:-
Dllc.getdata(dx, dy, it);

I have tried different calling conventions as well as different ways of writing the signature of the function. But the same error comes up. Any qucik help will be highly appreciated.

Regards
Amit
AnswerRe: Error while calling C++ DLL in C# Pin
«_Superman_»23-Mar-09 1:41
professional«_Superman_»23-Mar-09 1:41 
GeneralRe: Error while calling C++ DLL in C# Pin
Amit_T23-Mar-09 2:07
Amit_T23-Mar-09 2:07 
QuestionUploading/Download files on a server Pin
musefan23-Mar-09 0:41
musefan23-Mar-09 0:41 
AnswerRe: Uploading/Download files on a server Pin
Samuel Cherinet23-Mar-09 5:09
Samuel Cherinet23-Mar-09 5:09 
GeneralRe: Uploading/Download files on a server Pin
musefan23-Mar-09 5:34
musefan23-Mar-09 5:34 
GeneralRe: Uploading/Download files on a server Pin
Samuel Cherinet23-Mar-09 7:41
Samuel Cherinet23-Mar-09 7:41 
QuestionMicrosoft Sync Framework Pin
Axonn Echysttas23-Mar-09 0:23
Axonn Echysttas23-Mar-09 0:23 
QuestionHow to add a MSProject to other MSProject Pin
fan15823-Mar-09 0:10
fan15823-Mar-09 0:10 
AnswerRe: How to add a MSProject to other MSProject Pin
Cracked-Down23-Mar-09 2:32
Cracked-Down23-Mar-09 2:32 
AnswerRe: How to add a MSProject to other MSProject Pin
fan15823-Mar-09 15:51
fan15823-Mar-09 15:51 
AnswerRe: How to add a MSProject to other MSProject Pin
moon_stick23-Mar-09 2:39
moon_stick23-Mar-09 2:39 
AnswerRe: How to add a MSProject to other MSProject Pin
fan15823-Mar-09 15:56
fan15823-Mar-09 15:56 
QuestionCrystal Report Page Setup Pin
Yathish hatter23-Mar-09 0:00
Yathish hatter23-Mar-09 0:00 
AnswerRe: Crystal Report Page Setup Pin
Henry Minute23-Mar-09 5:09
Henry Minute23-Mar-09 5:09 
Questioncrystal reports Pin
ShivarajKumar22-Mar-09 23:52
ShivarajKumar22-Mar-09 23:52 
QuestionDataGridView seems to lose databinding Pin
Nigel Mackay22-Mar-09 23:37
Nigel Mackay22-Mar-09 23:37 
AnswerRe: DataGridView seems to lose databinding Pin
Spunky Coder23-Mar-09 0:23
Spunky Coder23-Mar-09 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.