|
Inam wrote:
where i can change my properties of Debugging to Enable Managed Debugging
Inam wrote:
This falls under the topic of 'basic things you should know before you begin to think about writing code'.
Pull up the properties for each project in your solution that is using unmanaged code.
Go to Configuration Properties Tab, Debugging.
Set Enable Unmanaged Debugging to true.
How can i check that if i have the symbols installed
Well, for the OS it is really dependant on whether you build your machine or if you have a managed desktop. For the former - you used to be able to select install symbols during the install process. For the latter -- you probably do not have symbols installed. Also, you need to reinstall symbols for the OS with each service pack and hot fix. Check MSDN or the main Windows website for installing the symbols. You should also be able to get the symbols from the Win32 SDK.\
The obvious tell tale sign that you do not have symbols installed is if the unmanaged code craps out, and VS says 'An exception occured within unmanaged code, but no symbols were installed....'
_____________________________________________
|
|
|
|
|
I have set the Enable unmanaged debugging to true but the same error comes .
Actuallt the error when catch through exception is
"
System.Threading.ThreadStateException could not instantiate ActiveX control 'GUID of Control ' because the current thread is not in a single threded appartment at System.windows.Forms.AxHost ctor(String clsId,Int32 flags).
"
Thanx in advance
Regards
minamkhan
Inam
|
|
|
|
|
Make certain that you are using the .NET wrapper that is in the design toolbox and not doing your own ActiveX control.
You have a Win32 form which (as the exception states) is apartment threaded. Unless you use specific thread types that are apartment-aware, then you will get that exception. It sounds like the control on your form is trying to start a thread of its' own which is a no-no in a Winform.
This really goes beyond COM, unmanaged debugging, etc. as it is the implementation of the control, not the actual execution of the unmanaged code.
_____________________________________________
Of all the senses I could possibly lose, It is most often the one called 'common' that gets lost.
|
|
|
|
|
I will explain the scenario
I am updating database with dataadapter method at the same time if some person is attempting for the same thing...How do i will get to know abt this?
Praveen
|
|
|
|
|
If you need more sophisticated algorithm for updating database change you application architecture.
And/or u can use SELECT FOR UPDATE SQL construct. But with this method selected rows will be locked for other users to update or delete.
Tomas Rampas
------------------------------
Systems analyst, MCSD
|
|
|
|
|
If you need more sophisticated algorithm for updating database consider changes in application architecture.
And/or u can use SELECT FOR UPDATE SQL construct. But with this method selected rows will be locked for other users to update or delete.
Tomas Rampas
------------------------------
Systems analyst, MCSD
|
|
|
|
|
How exactly the cookie will work with the form authentication. Is it possible to have form authentication without cookies.
One more
What "?","*" means in authorization tag of webconfig
Regards
Praveen Chintamani.
|
|
|
|
|
|
The cookie contains the encrypted FormsAuthenticationTicket that is sent with every request. The FormsAuthenticationModule decrypts this ticket (using the private key configured in the <machineKey> section of the machine.config or the application's root Web.config file) and creates a FormsIdentity from it that is used to authorize your requests against a protected resource (i.e., directory).
As for the rest of your question, the link the previous post mentioned contains a lot of information. Be sure to read it over.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hiya how do I return all items and subitems in a listview so I can write these values into an SQL database.
Thanks.
|
|
|
|
|
Get the value of ListView.Item[index] and its subitems through a loop. (foreach ), it also contain a property name SubItems which you can get sub items from it.
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
Hiya yeah I figured out how to do that but how do I actually do it??
Any samples available??
Thanks.
|
|
|
|
|
foreach(ListViewItem item in listView1.Items)
{
foreach(ListViewItem.ListViewSubItem sub in item.SubItems)
MessageBox.Show(sub.Text);
}
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
|
Hey
I got a Class that contains a ArrayList, this Array list is containing objects from another class(also Serilized). How do i Serilize class that contains tha Array list so i can send it over the socket and on the client side use the ArrayLists Objects?
//Jimmy
|
|
|
|
|
I think(not an expert):
You need to take every item in your ArrayList, find out what object type it is. Serielize every items value in those objects that you need to recreate those objects. Send the file to the client. The client opens the file, creats objects and adds them to an ArrayList.
I don't think there are any standard methods for serializing an ArrayList
Hope it helps
|
|
|
|
|
The ArrayList class is already attributed with the SerializationAttribute , meaning that is is serializable. When you use the classes from the System.Runtime.Serialization namespace, any such attributed class (and this attribute is not inherited by derivative classes, so to speak) has its private and public fields (not properties) serialized if they are attributed with the SerializationAttribute .
So, all you need to do is attribute your class (if you haven't done so already) and serialize it. The ArrayList will be serialized, too.
Now, in the case of XML serialization (using the System.Xml.Serialization namespace), only public properties and fields are serialized. This can be controlled using the attributes from this namespace. This type of serialization is not as good as the runtime serialization, though, because the latter takes much more into account and can also serialize into about any form you like (SOAP and binary formatters are provided with the .NET Framework base class library).
For more information on serialization in .NET, see Serializing Objects[^] in the .NET Framework SDK for more information and lots of examples for both types of serialization.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
For seialization of an ArrayList you would have something defined like this:
[Serializable]
public class myList:ArrayList
{
incorporate strong-typed exposures
}
[Serializable]
public class myDataType
{
private data and public accessors
}
Now you can easily Marshal this ArrayList across an application boundary.
If your applications closely follow the MS Design Guidelines, you would have to change the ArrayList to a Collection, since the MSDG states that Arrays should not be Serialized.
_____________________________________________
Of all the senses I could possibly lose, It is most often the one called 'common' that gets lost the most.
|
|
|
|
|
I came accross the DirectShow Media Player article (http://www.codeproject.com/cs/media/DirectShowMediaPlayer.asp) and added a fullscreen mode to that sample application. My problem is that I would like to be able to display a panel on top of that Video window when I move the mouse cursor (I cant even display the mouse cursor when moving mouse). But it seems that the Video window covers everything. Does anybody knows how to solve this (must be possible, since I can make a Context menu display on top).
Thx in advance...
|
|
|
|
|
The video window is designed to cover anything. This is true of most video players, mostly to facilitate DRM and DRM-like technologies so that you can't take screenshots of unlicensed material and other stuff like that. If there is a way, it'll definitely be a hack that would void your license and would be a difficult one at that. Especially in the case of Windows Media Player, it was designed by Microsoft so they would know all the (possibly) undocumented APIs to use to keep windows from overlapping in the same process or when in full screen.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi everyone,
Is it possible to add an "Uninstall" shortcut to the user's programs menu in addition to the shortcut to the project output when creating a setup deployment project in VS.NET 2003? And if so how? I can't seem to find a way to do this, any clues are highly appreciated!
Thanks,
rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Windows Installer automaticlly contain uninstallshield too. There is no need to do that. If the program installed and you run installer again it shoes the Uninstll option..
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
Thank you for your response. I know that the installer adds an uninstall item automatically to the Add/Remove Programs in the Control Panel, and the Setup deployment project even allows you to change the icon that is used there.
What I am trying to do is include a shortcut to uninstall the application into the application's folder in the user's programs menu. I can add a shortcut to the main project output there (so the user can launch the application from the Start -> Programs -> ProductName menu). I would also like to have the "Uninstall ProductName" shortcut in the Start -> Programs -> ProductName menu, as I find this more convenient for users that want to try the application.
Thanks again,
rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Windows Installer is a completely separate product from Microsoft. It includes a runtime (msiexec.exe) and the install packages are actually relational databases. Trust me, I've been beta-testing this since before 1.0 and consult for several companies regarding their installers.
InstallShield is a company that makes an development environment for Windows Installer, just like Wise Solutions does.
for the answer to this question, see my direct response to the initial post.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Since you're using the Windows Installer project in VS.NET, you can add an icon by first adding the icon to your project. The best way, however, is to use the icon embedded in your application (if you have an application as part of the installer, or even a library will do - anything with icons embedded (and that means into the executable, not as an embedded resource in the assembly)).
First (as I mentioned) add the icon or application to your installer project. Find the folder in which this will be located using the File System view, right-click and select either File or Project Output (project output is especially handy for projects in your solution, that way the latest build of that project is a dependency of the setup and the latest version is always used). Then, select the project itself in the solution explorer. At the top of the Property Grid, you'll see an AddRemoveProgramsIcon. Select the drop-down and click (Browse...). It will give you a window showing you all the possible files that can be icon sources. Select the appropriate one from the directory in which you added the icon or executable before. Click OK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|