Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to October 2006 Entries
Calling C unmanaged DLL with with output parameters char **result from C#
In C# library I wanted to call c function from YAZ library YAZ_EXPORT int yaz_marc_decode_buf(yaz_marc_t mt, const char *buf, int bsize, char **result, int *rsize); The problem was that I didn't know how to specify char **result in managed declaration. I didn't find similar samplers in Zoom.NET implementation.The article Call Unmanaged DLLs from C# recommended to use StringBuilder for LPSTR (char*) but it wasn't enough. After some experimentation I found that adding ref will do the trick(which makes ......

Posted On Tuesday, October 31, 2006 1:19 PM

Invoke Executable as custom action during Install.
I've used MS Installer class to provide custom actions during setup in a few projects(e.g.see Using VS 2005 Web Setup Project with custom actions).However if you have some complex logic to do as a part of setup, it is possible that some exception will occur. I don't like to hide exceptions, and they are shown to the user,causing installation to rollback. It is not good, becuse sometimes user wants to ignore exception and use installation even if some custom action failed.I found that moving code ......

Posted On Monday, October 23, 2006 11:14 PM

Zoom.NET v0.9c minor problems
I've downloaded and tried Zoom.NET v0.9c with .Net 2.0I decided to list some issues that I've noticed. 1. C:\Projects\Samples\Z39.50\... should use PrefixQuery, e.g @"@attr 1=4 ""Gong""" , not simple query "isbn=0253333490" 2. It is required to download latest YAZ from and copy DLLs from YAZ\BIN to \Zoom.Net.YazSharp\yaz to build \YazSharp for Windows successfully. 3. In YazSharp for Windows during search I've got: An unhandled exception of ......

Posted On Thursday, October 19, 2006 5:25 PM

LogCategory combo-box in Enterprise Library Exception Handling Application Block.
I've tried to create Enterprise Library Exception Handling Policy similar to described in Take Exception To Critical Errors With Custom Application Blocks , but I wanted to use standard Logging Exception Handler.However the LogCategory combo-box was empty and I wasn't able even save the configuration file due to error:"the value for LogCategory can not be null".It wasn't obvious for me that I have to create “Category source“ under “Logging Application Block“ first.It is not ......

Posted On Monday, October 16, 2006 4:34 PM

Side effect of debugging ClientID in DataGrid ChildTable.
I am using Metabuilders ExpandingButtons and started to get “Please check the page configuration“ error. Some investigation showed that my DataGrid control has two IDs, one as expected from ServerID and another with suffix “__Ctl0”. <table id="dnn_ctr374_ResultsConta... cellspacing="2" cellpadding="2" border="0" id="dnn_ctr374_ResultsConta... JavaScript from ExpandingButtons ......

Posted On Thursday, October 12, 2006 8:55 PM

ASP.NET CheckBox inside Datagrid returns Checked=false in Postback, if the column is not visible.
In one of ASP.NET pages I've used CheckBox column inside Datagrid, and on some condition the column containing checkbox was invisible TemplateColumn.Visible=false On postback my code tried to read if control is checked, and it always returned chk.Checked=false. It seems that it is done by design and invisible CheckBox does not have ViewState["Checked"]. As it suggested in the link Invisible column won't be rendered to the client.(http://www.velocity... ......

Posted On Wednesday, October 11, 2006 11:06 AM

Unable to call parameterized constructor for type arguments in Generic class.
I've tried to define a generic class, that uses a type argument derive from the specified base class without parameterless constructor.The sample code is the following: public class KeywordsSearchTestGeneric&l... where T : Keywords//',new() { // Methods public void ExactMatchCases() { T keywords1 = new T("string"); } } public class Keywords { // Methods public Keywords() { throw new NotSupportedException(); } public Keywords(string connString) { Debug.WriteLine("Keywords " + connString); } } ......

Posted On Monday, October 2, 2006 12:41 PM

Copyright © Michael Freidgeim | Powered by: