|
Hi Karthik,
Thank you very much. Your link is very useful. I will try it.
Kind regards,
Tai
|
|
|
|
|
I have migrated a bunch of C++/CLI code out of my main mixed-mode executable into a DLL but Windows explorer is not showing the details for the DLL. I set them like this in my AssemblyInfo.cpp:
[assembly:AssemblyTitleAttribute("MyDLL")];
[assembly:AssemblyDescriptionAttribute("A cool component")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("My Company")];
[assembly:AssemblyProductAttribute("My Product")];
[assembly:AssemblyCopyrightAttribute("Copyright © My Corp 2013")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
[assembly:AssemblyVersionAttribute("2.0.0.0")];
I also have a C# DLL with settings just like this in its AssemblyInfo.cs and they ARE shown in the Details pane of the Explorer Properties dialog.
I suspect I'll need to add a .rc file with VERSIONINFO but was hoping to avoid duplicating info like that (and it's a small hassle to hook into the build).
Has anyone here faced and solved this issue?
John
|
|
|
|
|
I'll answer my own question for future visitors. Yes, adding the VERSIONINFO resource was necessary. And, it was easier than I thought - just right-click on Resource Files folder in Solution Explorer, Add > Resource... and select VERSIONINFO.
John
|
|
|
|
|
Odd that Microsoft puts their debug annotations into their code now (winnt.h)-does that mean they'll finish testing at the customer premises?
Daniel Kilsdonk
|
|
|
|
|
|
Hello everyone,
so I'm using VC++ 2008 and I've got a large solution made up of several different interconnected projects, some of which are DLL's (no CLR). In one of these DLL's I'm trying to import an EXTERNAL Visual Basic dll using the command #import "C:\path\to\my\DLL\file.dll" . If I use this command in one of my .cpp files, it works. If on the other hand, I use it in one of my .h files, I then get the following compile errors in the files ocidl.h and comdefsp.h. I noticed that the .tlh and .tli files generated by the #import command include the file comdef.h. There are other files in my project that include the file comdef.h. Could this be the reason for the conflict?
Error 1236 "solution_name" error C2872:
Error 1237 "solution_name" error C2872:
Error 1238 "solution_name" error C2872:
Error 1239 "solution_name" error C2872:
Error 1240 "solution_name" error C2872:
Error 1242 "solution_name" error C2872:
Error 1243 "solution_name" error C2872:
Error 1244 "solution_name" error C2872:
Error 1245 "solution_name" error C2872:
|
|
|
|
|
since IDropTarget is a type, and it is referenced in ocidl.h, 'ambiguous' implies two definitions for the same, one must not disclude that the two definitions ARE the same and this would point to the common error of an include file, including itself.
An include file should never include itself! But include files are notorious for including themselves vis-à-vis other include files. While it is of poor craftsmanship, it IS promoted in K&R C manual itself when they proscribe something akin to:
#IFNDEF THISFILENOTALREADYREAD
#define THISFILENOTALREADYREAD
....
your h file: 'thisfile'
...
#ENDIF
If this is not the case, kindly submit the result of this search complete solution
'IDropTarget'
Also, there is a switch you can throw that will indicate the include files as they are included. That would be helpful.
Daniel Kilsdonk
|
|
|
|
|
I have project which I am compiling with /clr. I have a class like below..
ref class A
{
public:
void CheckValue(void * test);
typedef ref struct val
{
std::string *x;
}val_t;
};
in my implementation I ahve to use something like below..
void A::CheckValue(void *test)
{
a::val_t^ allVal = (a::val_t^)test;
}
in my main I have used like..
int main()
{
A^ obj = gcnew A();
a::val_t valObj = new std::string("Test");
obj->CheckValue((void*)valObj);
}
I am getting type cast error and two places - obj->CheckValue((void*)valObj); and at obj->CheckValue((void*)valObj); error C2440: 'type cast' : cannot convert from 'void*' to 'A::val_t ^'
This snippet is just to show behavior at my end and I ahve to use it this way only. Earlier I was running it using non /clr so it compiled fine.
Now question I have how can I make this type casting work in C++/CLI type project?
|
|
|
|
|
|
As we know C++ disdains poor typing. Some day it will achieve Pascal or Ada greatness!
Try:
desired_ptrtype newone=static_cast<desired_ptrtype>(voidstarptr)
Daniel Kilsdonk
|
|
|
|
|
Getting Access Violation Exception when trying to convert unmanaged array of structures into managed in Vb.Net(VS2010,4.0 framework) in Windows 7 -64 bit mode.
Sample Source Code
<structlayout(layoutkind.sequential, charset:="CharSet.Ansi)"> _
Public Class vb_menu_dotnet
Public level As Short
Public menu_id As String
Public short_desc As String
Public parent_id As String
Public access As Short
Public flag As Short
Public menu_desc As String
End Class
Dim current As IntPtr
Dim outArray As IntPtr
Dim manArray(100) As vb_menu_dotnet
vb_dotnet_get_menu_hierarchy(p_menu_handle, p_apl_id, outArray) //C API call
current = outArray
Dim j As Integer
For j = 1 To 100
manArray(j) = New vb_menu_dotnet()
Marshal.PtrToStructure(current, manArray(j)) //Access Violation Exception
Vijay
|
|
|
|
|
You may need to try a VB.NET forum. This is for C++/CLI code.
|
|
|
|
|
Dim current As IntPtr
Dim outArray As IntPtr
Dim manArray(100) As vb_menu_dotnet
vb_dotnet_get_menu_hierarchy(p_menu_handle, p_apl_id, outArray) //C API call
You have not initialised any of the pointers that you are sending to the C-language library. Take a look at this P/Invoke tutorial[^] for more information.
Use the best guess
|
|
|
|
|
Hi ,
whatever database u r acessing or data retrieval policy u might be using for e.g INI file,must be in Read Mode,Try to make it Write protected
|
|
|
|
|
Did you actually read the OP's question?
Use the best guess
|
|
|
|
|
Hi ,
whatever database u r acessing or data retrieval policy u might be using for e.g INI file,must be in Read Mode,Try to make it Write protected
|
|
|
|
|
can anyone help me finding the source code or the simulation of the Dual Busy Tone Multiple Access (DBTMA) protocol ????
regards...
|
|
|
|
|
|
Thanks alot, but i need a simulation for any BTMA, DBTMA or DUCHA .
i've a similar project based on multi-channel and busy tones.
regards
|
|
|
|
|
Well you could always refine the Google search that I created, which was based on the exact content of your question.
Use the best guess
|
|
|
|
|
All these search results are papers, but i need a written code
|
|
|
|
|
3bood.ghzawi wrote: i need a written code Well if you cannot find it by searching the internet then you will have to write it yourself.
Use the best guess
|
|
|
|
|
You have the patience of Job on this forum.
|
|
|
|
|
Not always.
Use the best guess
|
|
|
|
|
Hey.
I am trying to get my program to display only 2 decimals of the result og an calculation.
Code:
dansk = System::Convert::ToDouble(textBox2->Text);
kurs = System::Convert::ToDouble(numericUpDown1->Text);
tysk = dansk / kurs;
ti = tysk * 0.90;
femten = tysk * 0.85;
tyve = tysk * 0.82;
bdansk = tysk * kurs * 1.25;
bti = tysk * 0.90 * 1.25;
bfemten = tysk * 0.85 * 1.25;
btyve = tysk * 0.82 * 1.25;
btysk = tysk * 1.18;
label7->Text = System::Convert::ToString(dansk) + " Kr";
label8->Text = System::Convert::ToString(ti) + " Kr";
label9->Text = System::Convert::ToString(femten) + " Kr";
label10->Text = System::Convert::ToString(tyve) + " Kr";
label14->Text = System::Convert::ToString(bdansk) + " Kr";
label15->Text = System::Convert::ToString(bti) + " Kr";
label16->Text = System::Convert::ToString(bfemten) + " Kr";
label17->Text = System::Convert::ToString(btyve) + " Kr";
label20->Text = System::Convert::ToString(tysk) + " Eur";
label21->Text = System::Convert::ToString(btysk) + " Eur";
My ints are defined another place in my prpgram.
Right now my result will be something like 54.867563547, and not 54.86, as my wish is.
Can you help ?
|
|
|
|