Michael_Shao's Q&A profile
Software Development for Windows Vista Install different 32bit and 64bit registry entries
I am using InstallShield 12. I would like to have different registry entries for 32bit and 64bit hives, as the entries have to do with loading a DLL, and a 32bit app needs to load the 32bit DLL, and the 64bit app needs to load the 64bit DLL. This same application needs to pass the Vista certification!! Has anyone run into this before Hello Brian Clink, I think you are looking for the registry redirector functionality, please see the following MSDN documentation and get back to me if this is indeed what your looking for. http://msdn2.microsoft.com/en-gb/library/aa384232.aspx Also some information regarding the WOW6432Node in the registry: http://support.microsoft.com/kb/305097/ Tha ...Show All
Visual C# Build Events Error
Hi all trying to use the Build Events that are on the property page of the project I wish to copy a Directory so it's placed within the release folder when i compile. I write the following post build. [code] copy"$(ProjectDir) Reports" "$(TargetDir)" [/code] It works and my code complies but i get the following error message any one now why Error 1 The command "copy"C:\C# Work\ReportTest\ReportTest\ Reports" "C:\C# Work\ReportTest\ReportTest\bin\Release\"" exited with code 123. ReportTest Thanks!!! What I do is use a post-build event (be sure to only do it if successful) and then use XCOPY with the /E /Q /R /Y to copy all the files from the sou ...Show All
Visual Studio Express Editions Disabling the vertical scrollbar from a listbox
Any suggestions on how to would be greatly appreciated! I'm sure this suggestion will offend many of the purists round here, but you could just stick a label on top of it with the same background colour as your form. ...Show All
Windows Forms Setup project in C#
I am trying to create an MSI package for an application I have just written. The application has dependencies on .NET Framework 2.0 and Windows Installer 3.1. The problem I run in to with my setup project is that it is not installing the .NET Framework or Installer 3.1 when I install my application. I have provided the setup with a location where these files are located but it still insists on trying to get them from microsoft. Has anyone else run in to this problem Is this common This is my first attempt at this. If I understand correctly, you want to install these packages, if not found on the system, from within your setup correct Take a look at this and see if it helps: http://support.microsoft.com/kb/324733/ http://msdn2.mi ...Show All
.NET Development ICeeFileGen deprecated
I noticed in the documentation, http://msdn2.microsoft.com/en-us/library/ms404463.aspx , that ICeeFileGen has/will be deprecated in the future. What should we be using, from unmanaged compiler code, to create PE files Dave.Net Microsoft wrote: after discussing this with the CLR team, they confirmed that this interface will be deprecated in .Net3.0, you can use it in .NET 2.0 without any problems. Many compilers are using it (C#, VB, J#, ...), so it is not going to disappear anytime soon. I assume in .Net3.0, there will be a workaround for this interface. ...Show All
Visual Studio Express Editions Need help. Im new ;-)
Please correct me if im in the wrong place. Anyways im new to c# and i like it alot. Ive added what i want etc but here is my problem. I have one of them ToolStrip menu bars at the top (the blue ones with ability to do drop down) Now what do i do so that when a person clicks on one of the menu things it opens another part of the app but not in a new window. Just so the current window changes to whatever they clicked on. Sorry if thats confusing. Let me know and il try to make it clearer. Thanks Dan hi, killer You'd create a Movie Collection Starter Kit in Visual Studio visual C# and think about it, which has implemented the function you attempted. Hope you get it. ...Show All
.NET Development Static method in an Interface?
Is there a good reason why static method cannot be defined for an interface Remember that a static member is only accessible through a type reference, not an instance reference. Therefore in order to call a static member it must be type.member . If you were to allow static members on an interface then you would still have to use type.member to invoke them. In this case type would have to be a class or struct that implements it. Therefore even though it is defined in the interface it is still only accessible through the type that implements the interface. I don't see that you gain anything there. The whole purpose of interfaces is to isolate yourself from the underlying implementation so if I had to do this: IMyInterface ifc = ... ...Show All
Visual C# How do I import a variable that is exported from unmanaged dll?
I am interfacing an unmanaged dll and its has a couple of constant variables I need to import. I am trying to use DllImport but i get an error saying its for methods only. By far the easiest way to do this is to write a wrapper function that just returns the variable value. In case that is not possible, you can do something like this: in C++: extern "C" const int __declspec(dllexport) Variable = 10; in C#: [DllImport("kernel32.dll", SetLastError = true)] internal static extern IntPtr GetProcAddress(IntPtr hModule, string procName); [DllImport("kernel32.dll", SetLastError = true)] internal static extern IntPtr LoadLibrary(string lpsz ...Show All
SQL Server how to fix report layout problems
When you use Report designer in the BI development studio, on the Preview tab, you can have a straight preview or a print layout preview. I suppose what you see in the print layout preview is what you get when you print the report or export the report to the other format. However, often you see everything looks perfect in a straight preview but does look right in the print layout preview . For example, you might get the following problems in the print layout preview, even if everything looks perfect in a straight preview. · Every even page is a blank page · Items that should be together on the same page are separated into different pages. For example, on the first page, I had a TextBox1 followed by Image1 then foll ...Show All
Visual Studio Express Editions universal variables
Okay, I'm not sure if it's possible, but here goes: I know that in VB6, it was possible to declare a variable in the declarations (at least, I always did, and it worked) and then it would be there for the entire program. However, converting one of my projects over into VB2005, I have run into an error. In all of my subs, the variables are now "privately" declared, and I have no idea how or why it doesn't work anymore. My coding resembles this: dim a, b, c, d, e as decimal Private Sub Button_Click( ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button.Click Call determine_variables(a,b,c,d,e) Call show_variables(a,b,c,d,e) End Sub Sub determine_ ...Show All
.NET Development IIS 6 connection to SQL Server 2005
Hi, I have an aspx page with a connection to SQL Server 2005 which works fine on the local VS2005 setting. When I deployed it to an IIS 6 box it could not establish the connection. Could someone help shed some light Scenarios, Local to sql 2000 -- OK Local to sql 2005 -- OK IIS box to sql 2000 -- OK IIS box to sql 2005 -- Error The connection string is, "Data Source=DBServer;Initial Catalog=DB;User ID=uid;Password=pwd;Pooling=true;Max Pool Size=50;Min Pool Size=10;" I get the error message SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a conne ction to SQL Server) If connection string is, "Network=DBMSSOCN;Data Source=10.10.1 ...Show All
Visual C# Need itor to return a generic container, not the contents
I have a generic node class: public class RNode<T> { T ob; ...} I currently have a tree class defined as: public class RNodeTree<T> : IEnumerable<T> which includes GetEnumerator() as: public IEnumerator<T> GetEnumerator() { } The problem is this type of definition returns the content "T" (which is almost always what you would want), but I want an Enumerator that will return RNode<T>, as I want not only the data, but the linkage information too. Is there some way I can write a class that supports IEnumerable that will return the generic container While I know the syntax below is wrong, I hope it explains what I really want to return from the iterator... public class ...Show All
Smart Device Development Selecting from List View?
Hi, I have list view with only images(with no text). When I select Item in runtime It shows selection color to for beside space also. I want to show the selection (highlight color) only for that image. Can any one guide me to solve the problem Thanks in Advance, Hi sunni, Thank u for ur response. I din t find capture property for listview to set it true. Can you explain ...Show All
Software Development for Windows Vista ASP .Net Pageflow CTP
Do we have any update of Pageflow CTP Release Regards, Pavan Hi Pavan, There are no updates to the .NET Pageflow CTP at this time. Check out http://wf.netfx3.com/files/13/default.aspx for updates. Thanks Dennis ...Show All
Visual C++ CAsyncSocket leaks
Has anybody come across this problem before MFC CAsyncSocket will leak memory if you repeatedly create, bind and close the socket in a loop within a single thread provided there are no other CAsyncSocket objects alive during the duration of the test. For example, the following code will leak: void leak() { while ( true ) { CAsyncSocket socket; socket.Create(); } } while the following code will not leak: void noleak() { CAsyncSocket dummy; dummy.Create(); while ( true ) { CAsyncSocket socket; socket.Create(); } } The difference is that the dummy socket object in the noleak() function is kept alive during the duration of the while loop. In the CAsyncSocket::Create method it calls CAsyncSocket::AttachHandle. This will c ...Show All
