Click here to Skip to main content
15,887,313 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
Richard MacCutchan8-Jul-13 21:01
mveRichard MacCutchan8-Jul-13 21:01 
GeneralRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
chdboy8-Jul-13 21:40
chdboy8-Jul-13 21:40 
GeneralRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
Richard MacCutchan8-Jul-13 22:11
mveRichard MacCutchan8-Jul-13 22:11 
GeneralRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
chdboy8-Jul-13 22:45
chdboy8-Jul-13 22:45 
GeneralRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
Richard MacCutchan8-Jul-13 23:13
mveRichard MacCutchan8-Jul-13 23:13 
AnswerRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
TnTinMn10-Jul-13 9:31
TnTinMn10-Jul-13 9:31 
GeneralRe: Error Could not copy "pay.mdf". Exceeded retry count of 10. Failed. Pin
chdboy10-Jul-13 16:55
chdboy10-Jul-13 16:55 
QuestionProblem with P/Invoke Pin
Nooredin8-Jul-13 10:47
Nooredin8-Jul-13 10:47 
Hi I have written a code in C# to load functions in an unmanaged dll.
This is the code.
C#
class Program
 {
     static unsafe void Main(string[] args)
     {
         int deviceNr;
         char* Info;
         int intMyReturnVal;
         deviceNr = 0;
         Info = null;
         intMyReturnVal = sample_getinfo(deviceNr, Info);
     }

     [DllImport("opcard2lib.dll")]
     private unsafe static extern int sample_getinfo(int deviceNr, char* Info);
 }


and this is the API function description by dll supllier.

1. Sample_GetInfo

Prototype:
DLLReturnType
Sample_GetInfo (int deviceNr,
char* Info);

Parameters:
deviceNr is a number of found card in system
Info is handler for string with information about current card in system

Returns:
Returns 0 (zero) when success. Otherwise return an error code.

Description:
This function provide information about installed card in system. Information returned
in Info string looks like below:
„SN YY.SN rev. RRR", where:
YY – year of production
SN – serial number
RRR – firmware revision

The problem is that when I run this code I get the bellow error exception:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I have written this in VB.net to and get the same result.
I would appreciate your help.
AnswerRe: Problem with P/Invoke Pin
Richard MacCutchan8-Jul-13 20:58
mveRichard MacCutchan8-Jul-13 20:58 
GeneralRe: Problem with P/Invoke Pin
Nooredin8-Jul-13 22:38
Nooredin8-Jul-13 22:38 
GeneralRe: Problem with P/Invoke Pin
Richard MacCutchan8-Jul-13 23:09
mveRichard MacCutchan8-Jul-13 23:09 
GeneralRe: Problem with P/Invoke Pin
Nooredin9-Jul-13 10:38
Nooredin9-Jul-13 10:38 
GeneralRe: Problem with P/Invoke Pin
Richard MacCutchan9-Jul-13 10:47
mveRichard MacCutchan9-Jul-13 10:47 
GeneralRe: Problem with P/Invoke Pin
Nooredin9-Jul-13 11:42
Nooredin9-Jul-13 11:42 
GeneralRe: Problem with P/Invoke Pin
Richard MacCutchan9-Jul-13 21:22
mveRichard MacCutchan9-Jul-13 21:22 
GeneralRe: Problem with P/Invoke Pin
Nooredin10-Jul-13 23:10
Nooredin10-Jul-13 23:10 
GeneralRe: Problem with P/Invoke Pin
Richard MacCutchan10-Jul-13 23:23
mveRichard MacCutchan10-Jul-13 23:23 
GeneralRe: Problem with P/Invoke Pin
Nooredin12-Jul-13 21:06
Nooredin12-Jul-13 21:06 
QuestionApplication pool crash monitoring Pin
amjegan6-Jul-13 23:46
amjegan6-Jul-13 23:46 
AnswerRe: Application pool crash monitoring Pin
Eddy Vluggen8-Jul-13 7:08
professionalEddy Vluggen8-Jul-13 7:08 
AnswerRe: Application pool crash monitoring Pin
jschell8-Jul-13 8:33
jschell8-Jul-13 8:33 
QuestionHow to write data to XML file using ASP.net/C# if that file already using by another process Pin
ven7534-Jul-13 1:18
ven7534-Jul-13 1:18 
AnswerRe: How to write data to XML file using ASP.net/C# if that file already using by another process Pin
Bernhard Hiller4-Jul-13 3:31
Bernhard Hiller4-Jul-13 3:31 
AnswerRe: How to write data to XML file using ASP.net/C# if that file already using by another process Pin
Dave Kreskowiak4-Jul-13 6:00
mveDave Kreskowiak4-Jul-13 6:00 
GeneralRe: How to write data to XML file using ASP.net/C# if that file already using by another process Pin
ven7534-Jul-13 9:23
ven7534-Jul-13 9: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.