Click here to Skip to main content
16,015,444 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to program cash drawer? Pin
OriginalGriff1-Oct-10 5:21
mveOriginalGriff1-Oct-10 5:21 
AnswerRe: how to program cash drawer? Pin
Abhinav S1-Oct-10 5:54
Abhinav S1-Oct-10 5:54 
AnswerRe: how to program cash drawer? Pin
spencepk2-Oct-10 5:27
spencepk2-Oct-10 5:27 
QuestionDeploying new WCF service does not expose client ???!!! Pin
Michael Eber30-Sep-10 11:40
Michael Eber30-Sep-10 11:40 
AnswerRe: Deploying new WCF service does not expose client ???!!! Pin
PIEBALDconsult30-Sep-10 17:55
mvePIEBALDconsult30-Sep-10 17:55 
AnswerRe: Deploying new WCF service does not expose client ???!!! Pin
Abhinav S1-Oct-10 5:56
Abhinav S1-Oct-10 5:56 
QuestionFreeing UnmanagedType.ByValArray Pin
bajamba30-Sep-10 4:47
bajamba30-Sep-10 4:47 
AnswerRe: Freeing UnmanagedType.ByValArray [modified] Pin
Luc Pattyn30-Sep-10 5:44
sitebuilderLuc Pattyn30-Sep-10 5:44 
Hi,

whatever is marked [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82944)] inside a struct, becomes an integral part of that struct, and cannot be deleted/removed/disposed at all. The whole attribute is intended to mimic an unmanaged array inside a struct, that is why its size has to be constant and known at build time. The entire struct is a value type, so it gets allocated on the stack and lives as long as your surrounding method is alive.

Furthermore, I'm not sure how you are using your struct and why you would want to make it implement IDisposable. It would take more explaining I guess. The only use I see for struct.Dispose() is when it also allocates and holds on to unmanaged resources.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Thursday, September 30, 2010 11:52 AM

Questionwin7,sc delete, windows servis,process start Pin
tomorrow_ft30-Sep-10 3:50
tomorrow_ft30-Sep-10 3:50 
AnswerRe: win7,sc delete, windows servis,process start Pin
Not Active30-Sep-10 3:54
mentorNot Active30-Sep-10 3:54 
GeneralRe: win7,sc delete, windows servis,process start Pin
tomorrow_ft30-Sep-10 3:58
tomorrow_ft30-Sep-10 3:58 
AnswerRe: win7,sc delete, windows servis,process start Pin
Bernhard Hiller30-Sep-10 4:18
Bernhard Hiller30-Sep-10 4:18 
GeneralRe: win7,sc delete, windows servis,process start Pin
tomorrow_ft30-Sep-10 4:21
tomorrow_ft30-Sep-10 4:21 
GeneralRe: win7,sc delete, windows servis,process start Pin
Dave Kreskowiak30-Sep-10 5:33
mveDave Kreskowiak30-Sep-10 5:33 
GeneralRe: win7,sc delete, windows servis,process start Pin
Sunil G 31-Oct-10 18:35
Sunil G 31-Oct-10 18:35 
GeneralRe: win7,sc delete, windows servis,process start Pin
Dave Kreskowiak1-Oct-10 18:37
mveDave Kreskowiak1-Oct-10 18:37 
QuestionUsing C++ class in C# Pin
Nematjon Rahmanov30-Sep-10 3:36
Nematjon Rahmanov30-Sep-10 3:36 
AnswerRe: Using C++ class in C# Pin
Not Active30-Sep-10 3:51
mentorNot Active30-Sep-10 3:51 
QuestionRe: Using C++ class in C# Pin
Nematjon Rahmanov30-Sep-10 3:57
Nematjon Rahmanov30-Sep-10 3:57 
AnswerRe: Using C++ class in C# Pin
Saksida Bojan30-Sep-10 6:54
Saksida Bojan30-Sep-10 6:54 
GeneralRe: Using C++ class in C# [modified] Pin
Ziad Elmalki30-Sep-10 23:04
Ziad Elmalki30-Sep-10 23:04 
AnswerRe: Using C++ class in C# Pin
cepi691-Oct-10 5:08
cepi691-Oct-10 5:08 
QuestionActive directory permissions management Pin
allstarmisho30-Sep-10 1:44
allstarmisho30-Sep-10 1:44 
AnswerRe: Active directory permissions management Pin
Eddy Vluggen30-Sep-10 6:29
professionalEddy Vluggen30-Sep-10 6:29 
QuestionHow to compare the image in datagridviewImage column Pin
NarVish30-Sep-10 0:31
NarVish30-Sep-10 0:31 

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.