|
Does anyone know of any articles regarding the creation of a compiled component that I can call from regular ASP through this method:
dim obj
Set obj = Server.CreateObject("...")
obj.CreateGraphics(...)
set obj = nothing
I would like to write a graphics function that I will be able to call within ASP. Any help would be great. Thanks in advance.
Nick Parker
|
|
|
|
|
Yes, it's a COM component, almost always created with ATL.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Thanks Christian, I have been looking for something online but it looks like I may need to create something myself. I haven't been able to find a damn bit about Polar charts in OWC. I think I found an article on CodeGuru for this[ATL Components], but thought I would get everyone else's opinions first. Thanks agian.
Nick Parker
|
|
|
|
|
If you don't have time to learn ATL, you can use VB 6 to create COM DLLs. I haven't done that, but I do believe it should be an easy process.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I would like to learn ATL, really, I need to create graphics and we don't have the GDI available in VB 6. Any other ideas Nish? Thanks
Specs:
I only need to be able to draw one line, the direction the line points will be given in degrees, and I also need to label the endpoints to the line. Once this is done, I just need to save it as an image.
Nick Parker
|
|
|
|
|
Nick Parker wrote:
would like to learn ATL, really, I need to create graphics and we don't have the GDI available in VB 6. Any other ideas Nish? Thanks
Specs:
I only need to be able to draw one line, the direction the line points will be given in degrees, and I also need to label the endpoints to the line. Once this is done, I just need to save it as an image.
Well, ATL is not easy to start with. I mean unlike C# or VB you can't start coding in 2 days time. It takes time to dig in.
And if all you want to do is draw a line, I am sure VB has some line drawing functions.
But then ATL is sorta fun once you get the hang of it. I am still a sorta ATL newbie. I keep trying to find some time for learning it well, but never got the chance and then I am also lazy
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
|
I'm writing a database program accessing access2000.
"pRs->update() "is done,the message"IDispatch 3105"appear.
Who will help me?Why my Recordset is not be updated?Where i'll find the archive for solving ado error code?Thanks.
|
|
|
|
|
Most error codes can be found by searching TechNet.
|
|
|
|
|
I've tried to convert integers to numbers but it hasn't been working for me. I was wondering if there was just any way I could just enter characters into a matrix without having to convert integers to characters. Thanks. nywebhead@hotmail.com
|
|
|
|
|
What do you mean by integers to numbers ? Do you mean convert a number to a string ? ostringstreams will do that for you ( read my article ). Do you mean convert a string to a number ? atoi does that. An integer IS a number, so I don't know what you're meaning to ask.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Sorry, I ment I've tried to convert integers to characters. I've been working on that, but it hasn't gotten the job I need done, done. What I mena is, is there any way characters can be entered into a matrix? Sorry, my last post incorrectly.
|
|
|
|
|
A matrix is best represented by a two dimensional array, or a vector of vectors.
Integers to characters - you need to look at my ostringstream article. It also explains sprintf, the more common solution, and why it is of the devil. If you're using MFC, CString::Format will do the job nicely.
CString s;
s.Format ("Now theres %d green bottles, hangin' on the wall", 10);
AfxMessageBox(s);
The message box will report 10 green bottles on the wall.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Hi.
I am implementing a send and receive part of a simple message program. Everything seems to work okay, except the send and receive are not in sync.
For send, I use WSASend. I first send a "header" buffer with the same of the real data buffer. Next, I send the real data buffer.
For receive, I use WSARecv. I first receive the "header" buffer and determine its DWORD size. I then allocate a character array of that size. Next, I receive the real data buffer based on the size.
The problem is the "header" buffer I receive does not hold the correct data size. For example, let say the data size is 10 byte (10 characters). Instead of 10, I will get something at least in 90+ when I cast the "header" to a DWORD.
Here is the sample code for both send and receive. Please keep me updated if you find any known problem.
-----
char *data = new char[4];
data = "test";
DWORD bufferSize = static_cast<dword>(strlen(data)), sentSize = 0;
WSABUF bufferHDR,
bufferDATA;
char *header = new char[4];
CString sizeCnt;
sizeCnt.Format("%d", bufferSize);
strcpy(header, static_cast<lpctstr>(sizeCnt));
bufferHDR.len = 4;
bufferHDR.buf = header;
// sending first data buffer contain the size
if (WSASend(socket, &bufferHDR, 1, &sentSize, MSG_OOB, 0, 0) == 0)
{
bufferDATA.len = bufferSize;
bufferDATA.buf = data;
sentSize = 0;
DWORD bufferProgress = 0;
// make sure all data gets sent
while (sentSize < bufferSize)
{
if (WSASend(m_ActiveSocket, &bufferDATA, 1, &bufferProgress, MSG_OOB, 0, 0) == 0)
{
sentSize += bufferProgress;
bufferProgress = 0;
}
else
{
DetermineErrorWSASend();
sentSize = bufferSize;
}
}
else
DetermineErrorWSASend();
-----
-----
DWORD bufferSize = 0,
receivedSize = 0,
flags = 0;
WSABUF bufferHDR,
bufferDATA;
char *header = new char[4], *data;
bufferHDR.len = 4;
bufferHDR.buf = header;
// reading first buffer to determine real data size
if (WSARecv(socket, &bufferHDR, 1, &receivedSize, &flags, 0, 0) == 0)
{
CString x;
bufferSize = static_cast<dword>(*bufferHDR.buf);
x.Format("%s%d", "bufferSize = ", bufferSize);
AfxMessageBox(x);
// allocating memory based on buffer size
data = new char[bufferSize];
bufferDATA.len = bufferSize;
bufferDATA.buf = data;
receivedSize = 0;
DWORD bufferProgress = 0;
// make sure all buffer get read
while (receivedSize < bufferSize)
{
if (WSARecv(socket, &bufferDATA, 1, &bufferProgress, &flags, 0, 0) == 0)
{
x.Format("%d", bufferProgress);
AfxMessageBox(x);
newData += *bufferDATA.buf;
receivedSize += bufferProgress;
}
else
{
DetermineErrorWSARecv();
receivedSize = bufferSize;
}
}
delete [] data;
delete [] header;
}
-----
Thanks,
Kuphryn
|
|
|
|
|
Hi,
Where can I find the last approved specification of C++ ?, I know that the final papers are not free, but I remember seeing a draft or something.
Thanks,
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
ISO/IEC 14882 draft
FINAL DRAFT
Maxwell Chen
Lets make bugs better!
|
|
|
|
|
Does anyone know how I can temporarily disable the Windows keys (the ones that trigger the start menu)?
I tried a SetWindowsHookEx(WH_KEYBOARD,...) but my callback function never got called. (a snippet of sample code would be nice )
Thanks,
Marc.
|
|
|
|
|
Check your code. WM_KEYDOWN message with code VK_LWIN/VK_RWIN can be hooked (if use WH_GETMESSAGE). I think, WH_KEYBOARD can hook this keys too.
|
|
|
|
|
Thanks..
Actually I just forgot to put AFX_MANAGE_STATE(AfxGetStaticModuleState()); inside my callback proc so i couldn't see the TRACE output .
Now I see the WM_KEYDOWN messages for VK_LWIN and VK_RWIN in both the WH_GETMESSAGE and WH_KEYBOARD hooks, but I still can't figure out how to disable those messages once I intercept them?
...anyone please?
Cheers!
Marc.
|
|
|
|
|
My code looks like this:
CFileDialog m_FileDialog(FALSE);
m_FileDialog.m_ofn.Flags = OFN_HIDEREADONLY;
m_FileDialog.m_ofn.lpstrFilter = "Rich Text Format (*.rtf)\0*.rtf\0");
m_FileDialog.m_ofn.lpstrDefExt = "*.rtf";
m_FileDialog.DoModal(); <-------------------
Why do I get an assertion failed on DoModal() ???
|
|
|
|
|
Please show me where to put a *.lib file so that it will work? Right now, I put the library file in the same folder as the header file is, but the vc++ compiler still does not see the library file.
Thanks
|
|
|
|
|
There's at least a couple of ways to do it. The one I like most is simply to add the lib to the project, as you would do with a regular .cpp file.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Please show me how to import a *.lib file into my MCF project?
Is it possible to view a *.lib file using VC++ ?
|
|
|
|
|
Project / Settings | Link, Import Object/Modules
peter ho wrote:
Is it possible to view a *.lib file using VC++ ?
if you mean "can i find out which functions are available?" then no, there is no way to do that from VC. you will need the header files (.h)that should be included with any library.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
peter ho wrote:
Is it possible to view a *.lib file using VC++ ?
No. As Chris pointed out, you'll need the library's header file to call functions in the lib. If you're just curious and want to know what functions are exported, you can use the "nm" command that's part of the MKS toolkit.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|