|
hi...
I am using oracle 9i forms API in my DLL. Dll is working perfect except some time it gives error that is related to memory when the flow return from DllMain().
in DLL i am using the oracle 9i forms for the loading of oracle forms and using the object of those forms.
I am not using 'NEW' operator inside the DLL.
..please explain how to overCome the Problem...
thanks
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
And how is this related to Managed Extensions for C++?
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Hello,
I have created a Managed C++ assembly that takes window snapshots to create AVI movie files. This assembly consists of a __gc class to interface with other .NET applications and a __nogc inner class that makes calls to the Win32 API for the UI and Video For Windows calls to create the AVI. I am using IJW for all native class.
From a C# application, I attempt to call the constructor for my __gc class in the Managed C++ assembly. This works great on Windows XP, but when I try to run on Win2K Pro, I get a FileLoadException from the C++ assembly stating that it could not load an imported function.
I should be able to call the native VFW and Win32 API functions using IJW from a managed C++ class?
Any suggestions or advice you could provide would be greatly appreciated.
Thank You,
Andrew Moore
|
|
|
|
|
Obviously that function is only defined in XP....and you are building on XP.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Thanks leppie,
It looks like by default my compiler switches were setup to build for WinXP.
Andy
|
|
|
|
|
This sounds like a security/permissions issue. Is the 2K box loading the C++ assembly from a file share?
What are the details of the exception?
Nick Hodapp
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Nick,
No. The 2K box is loading the C++ assembly from its own disk.
The FileLoadException comes with the following message:
System.IO.FileLoadException: A procedure imported by "AVIGenerator" could not be loaded.
"AVIGenerator" is the name of my C++ assembly. I checked all of the Win32 API functions that I'm calling and they are supported on Win2K.
Would this problem have something to do with the dll entry point function that is generated. I have looked everywhere for a possible solution so far to no avail.
Thanks for your help.
Andy Moore
|
|
|
|
|
I need to redirect the access request to a file to another file, by changing the File Allocation Address for a file from within my program.
with all the best wishes
Manoj G.R,
grmanoj@yahoo.co.in
|
|
|
|
|
I developed one DLL in VC6 through win32 dll.
Then i called this dll in vb6 and i got accurate result. No problem at all.
Now i am trying to use this dll in vb.net but result is not accurate. The reason is vc6 produce unmanage dll that vb.net cannot use. Now i need to make Managed dll.
Can you guide me step by step to make Managed Dll and send me small example for Managed DLL. Should i use VC6 or VC.net for Manage dll development.
In the example use the function to get square of a number like below
int squareMe(int x)
{
return (x*x);
}
Hope to get reply soon
|
|
|
|
|
I am not an expert but .net should be able to use a unmanaged dll without recompiling. I am not sure how to do this though.
John
|
|
|
|
|
riaz_muhammad wrote:
Can you guide me step by step to make Managed Dll and send me small example for Managed DLL.
Refer to the Visual Studio Walkthroughs[^] to get started with C++.NET.
riaz_muhammad wrote:
Should i use VC6 or VC.net for Manage dll development.
You can not use VC6 to create a managed DLL.
riaz_muhammad wrote:
Now i am trying to use this dll in vb.net but result is not accurate. The reason is vc6 produce unmanage dll that vb.net cannot use. Now i need to make Managed dll.
You CAN use your unmanaged DLL from VB.NET. Refer to the following MSDN help lik, Consuming Unmanaged DLL Functions[^].
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
i have designed several bitmap resources in vc using 256 colors , which can display normally in resourceview. but when i added them in program, the displayed colors of them is 16 colors. the program is as follows:
COLORREF clrBk = RGB (255, 0, 255);
CBitmap bmp;
TRY{
m_ilsTamisTree.Create(IDB_TAMIS_s, 16, 1, clrBk);//sysytem
bmp.LoadBitmap(IDB_DATUM_9_s); //datum
m_ilsTamisTree.Add(&bmp, clrBk);
bmp.DeleteObject( );
...
}
CATCH(CMemoryException, e)
{
e->ReportError();
}
END_CATCH
,
i have tried to add iamge using icons like m_ilsTamisTree.Add(AfxGetApp()->LoadIcon(IDI_ICON1));
but it didn't work also,
how can i do?
arthur
|
|
|
|
|
|
|
I have seen this somewhere before, try searching the whole forum or google groups
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Um, yeah, thanks. Searches are the first thing I do. Posts here are the result of exhausting all other options.
I found the cause of the problem. I had a virtual destructor in a Form. I removed that and the problem cleared up.
The Ten Commandments For C Programmers
|
|
|
|
|
hi
i making a program to make dial-up connection and connecting to the net ,i dial with numbers stored in database , i use win API
like(InternetDial() ,InternetHangUp()), but i have two problems
1)InternetDial is dialing with default network connection on pc.
i need to make it taking numbers from database.?????
2) i want to create a new dial-up connection on pc, idont now what function i can use
thank u for advanced help
send me on hz_csharp@hotmail.com
|
|
|
|
|
Hello, i have a set of controls very similars (for example, 8 TextBox), and i want to create them in a TextBox array with Windows Forms Designer. In VB5 i done it putting the same Name property to all of them, but in C++ managed with Windows Forms Designer, i don't find the way.
I want to avoid make it by code because i have a lot of these type of controls.
P.D: forget my bad english please
|
|
|
|
|
Control Arrays aren't available in the current Visual Studio 2003 product, for any language. I believe we're working to reintroduce them in the Whidbey product.
Nick Hodapp
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Ffelagund wrote:
I want to avoid make it by code because i have a lot of these type of controls.
Why not code one control manually in a loop?
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
That doesn't be useful to me. For example, i have 8 TexBoxes, 8 CheckBoxes, and 8 Buttons, that all do the same function but with a diferent target (every textbox, checkbox and button handles some properties of every texture unit (i'm writing an OpenGL application), when i must check what button,textbox or checkbox has been changed/pulsed/etc, i must go trought all of them (one by one), and repeat a bunch of code. Currently i make an array of pointers and assign the controls to it, and do all the stuff in a loop, but this have some disadvantage because all must be manual (events and delegates) and the code becomes dirty because the "array-individual" mixted handling.
|
|
|
|
|
Hi there,
I want to build an RPL compiler (for HP calculators) in Managed C++.
I discover Managed C++ and .NET (I come from MFC), I saw the CodeDOM set of classes.
Will these classes help me to write my compiler?
In this RPL compiler, I want input a text file (with keywords, syntax etc.), and it generates a series of code ready to be linked. and once the program is linked, download it in the calculator
If CodeDOM is the correct tool for what I wanna do, can anybody show me some samples about CodeDOM?
Thanks for the help.
Best regards.
Bouli.
|
|
|
|
|
CodeDom is quite esy, but painfull to write (too much typing IMO), but seeing a RPL calc only uses simple operations, I suugest you look into dynamic assemblies, created with Reflection.Emit. As a starting point, look at AppDomain.DefineDynamicAssembly().
Good luck
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Hi,
Thanks for answering me
what I want to do is not an RPL calculator, but making a full compiler that will recognize syntax, keywords and so on from RPL language (it contains assembler too) and it will generate binary code that will run directly in the calculator.
ie:
the RPL programm look like this
::
ClrDA1Ok * clear 1st line
"Hello world" DISPROW1 * display "Hello world" on the 1st line with medium font
;
The compiler will generate the binary code that when it will run on the calculator...
For the compiler, in this example, only "::" and ";" are keywords.
ClrDA1OK and DISP1 are instructions (from a file) that correspond to readable entry point in the ROM of the calculator.
a declaration look like this:
=ClrDA1OK EQU #390CC *
=DISPROW1 EQU #1245B *
when the compiler sees ClrDA1OK, he knows that it has to replace this by "CC093" (inverted code for #390CC) = and EQU are keywords (this definitions are differents from the DEFINE keyword )
This compiler, has lot of keywords and it can mix assembler & RPL. I think, the best way to do that will be into 3 programs:
- Preprocessor (it will generates lines of textual code ready to be assembled)
- Assembler (it takes lines of code, handly written or generated by the preprocessor into machine code independent from the HP platform HP48-HP49 etc...)
- Loader/Linker (it generates the apropriate code ready to be transfer in the apropriate calculator)
I think .NET can do the job in a more easy way as MFC. .NET framework provides a lot of classes that are designed for this job
Maybe you or someone can show me what way to ride...
Best regards.
Bouli.
|
|
|
|
|
Hi all,
I am trying to use the InternetExplorer object to automate Internet Explorer from my Managed C++ application;
The following is a snippit of C# code that compiles and runs.
using SHDocVw;<br />
............<br />
............<br />
private SHDocVw.InternetExplorer m_IExplorer = null;<br />
..............<br />
............<br />
..........<br />
m_IExplorer = new SHDocVw.InternetExplorer();
However, when I convert it to Managed C++, thus;
using namespace SHDocVw;<br />
............<br />
............<br />
private: SHDocVw::InternetExplorer m_IExplorer;<br />
..............<br />
............<br />
..........<br />
m_IExplorer = new SHDocVw::InternetExplorer();
I get the compile error
C3153: 'SHDocVw::InternetExplorer' : you cannot create an instance of an interface
Does anyone know what I am doing wrong?
Regards,
Chris
|
|
|
|