|
Hi everyone,
I am trying to extract the files/folders information from the Data ISO (Joliet format) images. My motive is to read the information from the PVD (Primary Volume Descriptor), that resides on the begening of the 16th sector of the cd. After reading the information i want to display the files, folders contained in the ISO in terms of sectors.
For example : the data segment of a sector in (ISO)JOLIET format is 2048 bytes. if an ISO image contains following 5 files
A -> 500 byte
B -> 1000 byte
C -> 2000 byte
D -> 100 byte
E -> 400 byte
then in the explorer view the 17th sector(apx.) should display:
File Sector size SpreadFlag
A 17 500
B 17 1000
C 17 548(2000) yes
And sector explorer view for the next sector should display:
File Sector size SpreadFlag
C 18 1452(2000) yes
D 18 100
E 18 400
My query is that: is their any api available which can provide me the details of the ISO image CD in terms of sectors, path table, for the files contained in it or i have to do low level programming to fetch the list of contents available on the ISO image on the CD.
I will greatly appreciate any response provided by you.
thx.
~vikas
|
|
|
|
|
I get the most absurd error when I try to instantiate a reference to a SendOrPostCallback, where it refuses to take any System::Object^ for the first parameter for the delegate. Every example I've seen uses C# instead of C++/CLI, and consequently doesn't have this issue. Normally for delegates it's:
Delegate(this, &function)
Here's my code:
SendOrPostCallback^ post = <br />
gcnew SendOrPostCallback(gcnew Object(), &MessageEvents::MessageEvent::OnMessage);
this, gcnew Object(), and pretty much any other variation I can think of generate the same error,
Error 1 error C3754: delegate constructor: member function 'MessageEvents::MessageEvent::OnMessage' cannot be called on an instance of type 'System::Object ^' c:\Documents and Settings\jmarion\My Documents\Visual Studio 2005\Projects\ManagedServerSocketTest\ManagedServerSocketTest\SocketWrapper.cpp 205<br />
But, no object for the first parameter seems to please the compiler. Thoughts?
|
|
|
|
|
This :-
SendOrPostCallback^ post = gcnew SendOrPostCallback (&Classname::Function)
will instantiate the delegate.
This :-
post(gcnew Object())
will invoke it.
|
|
|
|
|
What's the easiest way to drop a .net control into my native C++ app with minimal impact to the existing app and minimal risk for something breaking?
|
|
|
|
|
Dave Calkins wrote: What's the easiest way to drop a .net control into my native C++ app with minimal impact to the existing app and minimal risk for something breaking?
Is the native app MFC based?
|
|
|
|
|
|
|
thanks I'll take a look at those articles.
|
|
|
|
|
Nishant Sivakumar wrote: Ah, then you can use the WinForms-MFC interop classes.
And thanks to the CP Network errors my reply saying this was not possible and making me look like the idiot I am did not get posted! Yay!
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Whats the simplest way to pan sound in .NET. I'd rather not use DirectX, and I know the typical way is to pinvoke winmm.dll, but I can't figure out winmm.dll handles balance. I just want to play sound out of specific speakers/channels, for instance moving from right to left.
|
|
|
|
|
Hi, probably not the best place for this but maybe someone can help.
For one of my programs i'm trying to impliment my own version of the RSA algorithm, the encryption works fine, however the decrption does not, even though it uses basically the same algorithm. The code is as follows:
<br />
<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include "math.h"<br />
<br />
<br />
int do_crypto(int M, int e, int N);<br />
<br />
int main()<br />
{<br />
<br />
printf("...\n");<br />
<br />
int p = 17;<br />
int q = 11;<br />
int e = 7;<br />
int N = p * q;
<br />
int M = 88;<br />
<br />
int C = do_crypto(M, e, N);
printf("C = %d \n", C);<br />
<br />
<br />
int d = ( ( (p-1) * (q-1) ) / e );<br />
printf("d = %d \n", d);<br />
<br />
<br />
int m = do_crypto(11, 23, 187);
printf("m = %d \n", m);<br />
<br />
<br />
return 0;<br />
}<br />
<br />
int do_crypto(int M, int e, int N)<br />
{<br />
int iret = int ( M * exp(e) ) % N;<br />
<br />
return iret;<br />
}<br />
<br />
When decrypting I have put in actual values for the keys etc, and the result should be 88.
The actual formulas are:
ENCRYPT: C = Me (Mod N)
DECRYPT: M = Cd (Mod N)
*** Please note the 'e' and 'd' are supposed to be superscript, e.g. raised to the power of...
|
|
|
|
|
rawstar wrote: *** Please note the 'e' and 'd' are supposed to be superscript, e.g. raised to the power of...
You mean like this?
ENCRYPT: C = Me (Mod N)
DECRYPT: M = Cd (Mod N)
Since this has nothing to do with C++/CLI you might get more eyes on it in the VisualC++ forum.
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
Hello,
I am starting to develop application in Visual C++ .Net (Visual C++ 8.0).
I made a little project and now I want to make an executable file which it could be copied in a different computer or folder without install it or without copy any DLL, I want to copy just the executable.
I was trying to configure the project option but I failed.
When I worked with Visual Studio 6.0 (Visual C++) I could set the link option like static so I could copy the exe file in different folders or computers
I need your help trying to solve this issue.
Juan
|
|
|
|
|
working with managed or unmanaged code ?
|
|
|
|
|
What do you mean with manage or unmanage code?
I just have one
#define _CRT_SECURE_NO_DEPRECATE
|
|
|
|
|
i mean, you use MFC, Win32 or such libraries which generate natice code (directly for the target microprocessor), or using managed code, which is actually an intermediate language for the .NET framework...
|
|
|
|
|
jucanpo wrote: copied in a different computer or folder without install it or without copy any DLL, I want to copy just the executable.
They hide that information in the Documentation[^]
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
I've been trying to figure out what's the problem here. A simple GDI+ code to draw a pie.
GraphicsPath m_Paths;
Rect rc0(0, 0, 191, 191); // Give it a rectangle size of 191x191
m_Paths.AddPie(rc0, 180, 90); // Draw the pie at angle 180 with a sweep angle 90.
m_Paths.Flatten(NULL, 0.03f);
// Now if you draw the pie, there's a problem, it won't draw the verticle line at the end of the pie.
Pen myPen((ARGB) Color::Black, 1.0f);
Graphics g(pDC->GetSafeHdc());
g.DrawPath(&myPen, & m_Paths);
// If I don't use the Flatten or change it to
m_Paths.Flatten(NULL, 0.02f);
// or
m_Paths.Flatten(NULL, 0.04f);
// Both of these works. Just not the 0.03f.
What's the problem?
|
|
|
|
|
It looks like a bug. I am able to reproduce the same problem. I also checked the status returned from this call:
Status ret = m_Paths.Flatten(NULL, 0.03f);
and ret is OK.
Best,
Jun
|
|
|
|
|
The weird thing is making the pen width large works. Changing the pen style to dash and everything else works. Only the solid line doesn't.
|
|
|
|
|
Yeh... I didn't play further, but it doesn't work in all cases. To me, there is no reason why it should work on 0.02f and 0.04f, but not in 0.03f.
Best,
Jun
|
|
|
|
|
we have an older application that we would like to extend with managed code (written in c#). The extension was planned to be through a dll written in C++ that would call managed part - as proposed in the following article: http://www.codeproject.com/dotnet/bridge.asp
problem is that when I write a simple non-managed app in VC2005, I can call managed part without any problem, but when I try to call it from the same application compiled with VC6, it simply breaks.
here is the C# assembly code:
namespace ClassLibrary1
{
public class Class1
{
public static int ShowDialog(string sText, string sCaption)
{
System.Windows.Forms.MessageBox.Show(sText, sCaption);
return 0;
}
}
}
here is the wrapper C++ dll
using namespace System;
using namespace ClassLibrary1;
using namespace System::Windows::Forms;
extern "C" __declspec(dllexport) int __cdecl callDotNet(char *text, char *caption)
{
String ^sText = gcnew String(text);
String ^sCaption = gcnew String(caption);
// MessageBox::Show("about to enter Class1");
Class1::ShowDialog(sText, sCaption);
return 0;
}
and here is the simple console app that calls a DLL that calls C# code:
extern "C" __declspec(dllexport) int __cdecl callDotNet(char *text, char *caption);
int main(int argc, char* argv[])
{
callDotNet("sample text", "sample caption");
return 0;
}
This works if it is compiled in VS2005 but breaks when compiled in VC6 (unhandled exception in console2.exe (KERNEL32.DLL): 0xE0434F4D:(no name).)
Unfortunately it is not possible to recompile the old application with VC2005 since it is pretty old application with a lots of code written in cobol.
This may be a newbie question or has been discussed before, but I searched the message boards and could't find anything similar. I am not sure at all that it is possible to connect unmanaged code with managed code this way. Am I on the right track? Tnx in advance
Dragan Matic
|
|
|
|
|
Dragan Matic wrote: non-managed app in VC2005
VC6 has no support for the .NET platform (managed code), you must use later compiler.Dragan Matic wrote: it is pretty old application with a lots of code written in cobol.
And you compile Cobal with VC6?
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|
|
led mike wrote: VC6 has no support for the .NET platform (managed code), you must use later compiler.
I know that, but it was my understanding that functions prefixed with extern "C" will be visible (and callable) as simple C functions. I expected to be able to call them as any other dll that exports some functions and structures.
led mike wrote: And you compile Cobal with VC6?
No, actually the application we have is an old cobol application now largely extended and partly replaced with code written in VC6. Cobol can call VC6 dlls, so I thought it could also call dlls written in VS2005 - as long as the functions are exported with extern "C" prefixes. When I didn't succeed in that, I tried to call a dll from program written with VC6 only to find that is not possible, too.
|
|
|
|
|
Dragan Matic wrote: No, actually the application we have is an old cobol application now largely extended and partly replaced with code written in VC6.
So you mean with VC6 DLL's? You might have a library problem. A C/C++ DLL requires support of the CRT libraries at a miniumum and VS2003 and 2005 had new CRT versions.
"Alot of the people on this forum are incredibly stupid, thinking that the internet is real" Score: 1.0 in the Soap Box
led mike
|
|
|
|