|
Dear Dave,
Thank you for your advice seem like close the solution I want to implement.
I am looking for the .NET code generator to generate the C++ DLL as that translates the source into usable .NET package.
I can manage to find only the working sample of Data Base Code Generator in .NET but not C++ DLL.
Best regards
|
|
|
|
|
That's because there isn't one.
.NET (managed code and CodeCom classes) cannot write a C++ library .DLL. You have to use the C/C++ compiler to do it. Unless, that is, you want to write you own compiler.
|
|
|
|
|
Hi,
How about C++ to C# Code Converter developed by tangile software solutions seem like i want.
But not same or ok for my C++ source or DLL especially for C++ structure pointers or most of keywords used in C++ to C# keywords.
Best regards
|
|
|
|
|
|
Hi,
Thank you your word and if u came across any source or something pls let me know.
Even, I had draft idea to implement this but don't know what will be the detailed requirements.
Nothing is impossbile under the sun shine except very tight dead line.
Best regards
|
|
|
|
|
Hi Members,
I have a requirement where i need to display a popup control through my window service. I know in Win 7 window service can not communicate to desktop.
So can i get some ideas over it.
Regards
|
|
|
|
|
I suppose one thing you can do is create seperate applications and send/receive windows messages between them.
Here's a quick google result[^]
If you've never done this it might take you a few hours to figure out how it is done. I suggest a small test project and build from there.
hope this helps. But again, try to talk to your boss about this ridiculous requirement.
|
|
|
|
|
repost from yesterday (in the same forum!)
|
|
|
|
|
Hi Members,
I have an applications installed on two machines (client & server) on a Network. Whenever any upgrade of the application is available on the Server machine, Server machine have to notify the client machine. This notification has to be made through the Taskbar Flyout or Tray Notification similar with notifications of java version upgrade or AVG AntiVirus Version Upgrade
I have tried to resolve this thing using Window service and this approach is working nicely on the XP or lower version of o/s. But on Window 7 it’s not working as we all know that from vista onwards Window services run on a different session
So can somebody please comes up with any idea so that I may able to resolve this problem
Regards
|
|
|
|
|
PankajKSood wrote: But on Window 7 it’s not working as we all know that from vista onwards Window services run on a different session
"We" also know that Google has links to how this is solved.
PankajKSood wrote: Whenever any upgrade of the application is available on the Server machine, Server machine have to notify the client machine.
..and what do you do with the client-apps whose machine is turned off? Usually, the client-app "asks" the server whether an update is available (as easy as checking if a new file is on your server) and proposes to download it.
|
|
|
|
|
I told you exactly how to do this yesterday.
Again, you DON'T do this from a Windows Service and you really don't need a service to check for a new version of an app. You can do that with a normal application that runs out of the registry's Run key which will run whenever a user logs in.
|
|
|
|
|
Hi
I have implemented the IWMHeaderInfo3 interface from the Windows Media Format SDK as follows:
[ComImport, Guid(IID.IWMHeaderInfo3), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IWMHeaderInfo3 : IWMHeaderInfo2
{
...
void GetAttributeIndices([In] ushort wStreamNum, [In, MarshalAs(UnmanagedType.LPWStr)] string pwszName, [In] ref ushort pwLangIndex, [Out, MarshalAs(UnmanagedType.LPArray)] ushort[] pwIndices, [Out, In] ref ushort pwCount );
...
}
My problem is that according to the MSDN documentation the pwLangIndex parameter needs to be passed a null value at times. However a ushort cannot be assigned a null value so when I try to reference the method in code with a null in that position it complains the closest matching method has invalid parameters.
The unmanaged method is expecting a pointer to a WORD for this parameter so could I use IntPtr instead of ushort and the MarshalAs command to treat it as a WORD *? If so how do I do this?
What is the correct way to get around this issue? All help greatly appreciated.
|
|
|
|
|
You can create a "nullable" ushort as follows:
ushort? pwLangIndex = null;
|
|
|
|
|
Unfortunately this doesn't work. You can't pass a ushort? variable to the parameter.
I tried changing the parameter type to a ushort? in the method declaration but at runtime this results in an exception (Cannot marshal 'parameter #3': Generic types cannot be marshaled.) being raised.
|
|
|
|
|
|
Hi Gerry
I tried changing the parameter type to an IntPtr without the ref and using IntPtr.Zero in the call but that results in a "Value does not fall within the expected range." exception at runtime.
If I keep the ref it complains that IntPtr.Zero is a static const so can't be used as a ref parameter. Using a variable of type IntPtr instead causes a memory access violation.
|
|
|
|
|
If you could provide a more complete sample then others could actually try out their suggestions first. As it stands, it's not that easy to reproduce your problem.
|
|
|
|
|
You can try changing the ushort parameter to an IntPtr and just send in 0.
|
|
|
|
|
Hi Dave
I tried changing the parameter type to an IntPtr and using IntPtr.Zero in the call but that results in a "Value does not fall within the expected range." exception at runtime.
|
|
|
|
|
Well, it was worth a shot.
|
|
|
|
|
Create an overload with that parameter changed to System.IntPtr and pass System.IntPtr.Zero when you require null.
|
|
|
|
|
Pass whatever NULL is in the Windows libraries, which I think will be 0.
|
|
|
|
|
hi! i wrote a code for a GPS sever which analyse the trame received from a client and thanks to this trame, it may localise tha place in which the client is situated! How can i modify the trame and the code so the client will be abla to send in the trame a sign to show if he is in emergency!
and please where i can fnd exemples of trames of a person who is moving ?? Help please!!!
|
|
|
|
|
You're going to have to explain what a "trame" is.
|
|
|
|
|
it is a frame: the message that receives the server and contains the informations! in mu code i used a frame GPRMC sent by a client! sorry i am used to study in frensh that's why i used the word trame
|
|
|
|