|
Then you need to be more specific as to what you consider "optimized."
|
|
|
|
|
Dear friends
i have a doubt
i am having
“#define Integrated” in my every class.
Is it possible to have it in a common file are in a general place only once defined
Any help or Idea?
By
Joe
|
|
|
|
|
You could define it at the compiler level in your project. See menu item Project -> Properties -> Build.
It's time for a new signature.
|
|
|
|
|
Thank you very much .....
i used Conditional compilation symbols
Thanks
|
|
|
|
|
Hi all,
I am gettting following error when I try to run a winform application which invokes the COM component
Anybody have idea how to resolve this problem? I could not get any info from googling on net
Unhandled exception has occured in your application. If you......blaw blaw
Retriving the COM class factory for component with
CLSID {491B.....} failed due to following error 80080005
Error :
************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {491B6189-7E9D-43F4-A7DE-C062DF7B326E} failed due to the following error: 80080005.
at ComInvoker.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ComInvoker
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/CUMMINS/InvkoerSetup/ComInvoker.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Interop.MLApp
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/CUMMINS/InvkoerSetup/Interop.MLApp.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
|
|
|
|
|
Check in the registry to see if this component is registered. If not, attempt to register it using the regsvr32 command. It it is registered, use depends.exe[^] to check that all the things it's relying on are registered.
|
|
|
|
|
and it works well on an earlier system?
could it be your app is compiled for "AnyCPU", your Win7 machine uses 64-bit, and your DLL is built for 32-bit?
On Win64, you can't mix and match within a single process.
If the above applies, then:
- either build for "x86" (i.e. 32-bit); this assumes all your native code is 32-bit;
- or look for a 64-bit DLL (and give your app the advantages, if any, of 64-bit).
|
|
|
|
|
I have created a test application and and I am invoking two COM objects from it one is Matlab application and other is Word. I am getting above error for Matlab COM and Word Com is opens without error
I have already done the above changes like build for "x86", we are just porting our application to windows 7 and we are gettting this error. I got admin rights on windows 7.
one info this com is present in registry
|
|
|
|
|
Hi,
I am tring to read an Package object embedded in an MS word 2007 docx file using c#. I want to read the content(Can be an ppt,excel or an image) inside the package object. Currently I have just one file inside the package object.
Thanks in advance for any help.
Akash Agarwal
|
|
|
|
|
|
|
Hi,
I am using a ToolStrip DropDown Button and there are several ToolStripMenuItems. I would like to have the left side bar (like in right click context menus) there. Is it possible to do so? Is there any property to set?
Thanks!
CJ
|
|
|
|
|
Hi,
I want to support Esc key and Enter key for CancelButton and AcceptButton in my windows form application. I cannot directly use the buttons since they are ToolStripButton. Therefore, I have written a Wrapper like below extending the IButtonControl. The below thing works perfectly for the cancel button but not working for the AcceptButton. Please have a look and let me know if you have any idea.
public struct IButtonWrapper : System.Windows.Forms.IButtonControl
{
public Action MyAction;
#region IButtonControl Members
public DialogResult DialogResult
{
get
{
return System.Windows.Forms.DialogResult.None;
}
set
{
}
}
public void NotifyDefault(bool value)
{
}
public void PerformClick()
{
MyAction.Invoke();
}
#endregion
}
Thank you,
CJ
|
|
|
|
|
Hey guys...
I have the last couple of days explored the beauty of SNMP protocol for smart network device programming using MIBs og OIDs.... But I was thinking, how does I get the mac address of a device, eg. connect to switch port number #12?
I have looked at the cisco example, but it seems to but the opposite case (you KNOw the mac address, and want to find the specific port on the siwtch).
In my case its like:
"You KNOW the PORT located on the switch, and want to extract the MAC address on the equipment connected to that specific port".
Any1 got an idea that could help me in the right direction?
|
|
|
|
|
Have a look at this[^]
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Thanks for your suggestions, but it didn't quiet make my solution. I'm looking for an API with a DLL I can use for this purpose, I want to use the existing SNMP protocol with correct MIBs and OIDs to collect and find the mac address on a switch port which is already known.
I have almost figured out at this time, how I locate a switch port based on a known mac address, but I want the opposite options if even possible?
My last thoughs was read the FDB table mib request (which should return all mac address' and portnumber for each?), and sort them after the port number? But I stumbled on it, cuz it seems that it returns some wrong bits (which ain't representing the MAC address in HEX string).
Any other suggestions, that could help me using the SNMP and mibs, collecting a mac address, on a KNOWN switch port?
|
|
|
|
|
hi
I wrote a windows service in c# that its starttype is aoutomatic but when I restart or start the computer it's not working. it is only working manual
why its happen??
thanks
|
|
|
|
|
Hi,
did you receive an error within the system-event log? If yes, could you post the error message?
Regards
Sebastian
|
|
|
|
|
no I didn't. also when restart comp. service's state is looking "beginning" and in event log says that "service start" but service's state is not to be "beginned"
|
|
|
|
|
Hmmm... maybe it hangs in the OnStart-event. Could you post the code of your OnStart()-method?
|
|
|
|
|
protected override void OnStart(string[] args)
{
inform("START");// for event log
timer1.Start();
proccessorid();//I give all system info
learnsystem();
Process.Start(string.Format("http://XXX.XXX.XX.X:4561/Default.aspx?proccessor_Id={0}",proccessor.ToString()));//I send system info a web page
}
|
|
|
|
|
I would suggest that you write to the event log after each call (timer1start(), processorid()...) This will show you when your service hangs...
|
|
|
|
|
no event log doesn't work after functions. but it is working manual succesfully
|
|
|
|
|
Ok, and after which function? You should try to log to the disk (fixed file would be sufficient first) so that you can reconstruct the point of failure...
|
|
|
|
|
"You should try to log to the disk"
How am I doing it??
|
|
|
|