|
Dominik Reichl wrote:
Now it works!! I've replaced the WINAPI declaration (=__stdcall) with __cdecl and now everything works fine!
Thank you VERY much!
Glad I was able to point you in the right direction. It would be interesting to know if this was related to your earlier problem of the DLL unloading and if putting the code optimization back how it was worked!
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I enabled the code optimization again and tried it... the program doesn't crash any more with optimization turned on... so it seems these problems were related somehow.
You were right from the beginning, that code optimization cannot be the source of the problem...
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Dominik Reichl wrote:
You were right from the beginning, that code optimization cannot be the source of the problem...
This really didn't sound right, which is why I nagged you a bit. Put it down to experience. Good to hear all the problems have been resolved.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I am doing an application using TAPI32.lib.I have to capture the incoming call number.I have PCTel modem.AT#CID=1 command also working fine.I ahve down loaded caller ID applications and run,but they will not showing caller ID.My phone line has caller ID service.what is the caller ID system in India.
Anybody please kindly let me get rid of this problem.
yakkalas
|
|
|
|
|
I am also searching for the same, if you get any solution please let me know also..
Thanks in advance
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
Hi what i want to accomplish is this:
To transfer a file from one folder to another folder without having to do that manually. ie. open both folders and drag and drop, or copy and paste.
What i want is to have a very basic console program or win based but preferably console based, that exists in the folder with the file and i just want to be able to drop the file on top of the console icon and for it to be sent to the destination folder.
I need almost no user input just to drop the file on top of the icon to run the program to send the file to its destination folder.
Anyone have anyi deas how i would go about doing this.
im using VC++.NET environ.
kind regards
Dave Long
|
|
|
|
|
Have a look at WM_DROPFILES. I haven't done much with console apps, but this is what you use in a Windows app. Also CWnd::OnDropFiles(). This is what I use in ED (see sig) if the user drops a file on it, whether it is running or not. Hope that helps.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
IMO you will need a winapp to do this.
A very easy way to do this is :
Make a batch file (like the following, just replace [destination path] with your path.)
@echo off
if "%1" == "" goto end
if not exist %1 goto end
copy %1 [destination path]
:end
Put the batch file (name it mycopy.bat) iy your windows SendTo directory.
Now every time you want to copy a file, right-click on it, go in the SendTo submenu and click on mycopy.bat. Your file will be copied.
~RaGE();
|
|
|
|
|
Hi
Need to convert a DWORD to a CString
and a CString to a DWORD type.
Hope someone knows
Greetings
Jens
|
|
|
|
|
Hi,
converting a CString into DWORD means, u are going to covert integer to char
here is example.
#define HELLO 100
DWORD dwrd=HELLO;
CString str1;
char str[10];
str1=itoa(HELLO,str,10);
//CString str1=str;
AfxMessageBox(str1);
this will convert the DWORD into CString,but it is not wise.You can't get CString value like "HELLO". it is not possible i think.you can get 100 as a CString value.
yakkalas
|
|
|
|
|
DWORD is also an unsigned integer,trying to convert it into CString means converting integer to char.
Here I am sending simple Ex.
DWORD dwrd=HELLO;
CString str1;
char str[10];
str1=::itoa(HELLO,str,10);
//CString str1=str;
AfxMessageBox(str1);
This simple code will show u 100 not HELLO.So as I am thinking,it is not possible.
You mean to try to get CString value as HELLO?
if so it is not possible as per my knowledge.
yakkalas.
|
|
|
|
|
DWORD is also an unsigned integer,trying to convert it into CString means converting integer to char.
Here I am sending simple Ex.
#define HELLO 100
DWORD dwrd=HELLO;
CString str1;
char str[10];
str1=::itoa(HELLO,str,10);
//CString str1=str;
AfxMessageBox(str1);
This simple code will show u 100 not HELLO.So as I am thinking,it is not possible.
You mean to try to get CString value as HELLO?
if so it is not possible as per my knowledge.
yakkalas.
|
|
|
|
|
Well, it's like this i wanted:
I got a CString strValue = "5";
But i got a function which only accepts DWORD values;
so instead of CString strValue = "5";
It need to be converted to:
DWORD dvalue = 5;
that's all to it actually.
|
|
|
|
|
CString strValue="5";
DWORD dValue=atoi(strValue);
then dValue contains what is the value in strValue.
dValue=5;
yakkalas
|
|
|
|
|
|
ok thanks for your help all.
I fixed the problem like this:
//CString -> long integer
CString strBurnr = m_listbur.GetItemText(1,2);
DWORD burnr = atol(strBurnr);
//Long Integer -> CString
char* szTemp;
ltoa(burnr, szTemp,10);
CString strTemp;
strTemp = (CString) szTemp;
Thanks, all works fine.
and btw (this isn't about conversions: does anyone of you guys know how to put a button in a field (in CListView) at every row?)
Greetings
Jens
|
|
|
|
|
JensB wrote:
char* szTemp;
ltoa(burnr, szTemp,10);
This can't work. You've allocated no memory for szTemp. It's just a pointer pointing to who knows where!
To get a number, whether its an int, long, etc, into a CString object, just use CString::Format() as in:
DWORD dwNumber = 123;
CString strTemp;
strTemp.Format("%lu", dwNumber);
|
|
|
|
|
yeah i'm sorry
I made a typo there
i had 'char szTemp[10];' here
Anyway, thanks
|
|
|
|
|
DWORD-STRING itoa()
STRING-DWORD atoi()
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
Hi, I am currently writing a program in VC++ trying to find a particular word from a MS word document without opening MS word. I have imported the Type Library of MS Word and I have figured out how to Open, Close and Print documents but i have no idea on how to do a search to find a particular word.
Does anyone know how to do this or does anyone know where I can find more information on this ?
Thank you!
|
|
|
|
|
Have you looked into the Words and/or Find classes?
|
|
|
|
|
COleVariant covTrue((short)TRUE);
COleVariant covFalse((short)FALSE);
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
BOOL bWildCard = vtWildCard.boolVal;
CString csFind = vtFind.bstrVal;
CString csValue;
VARIANT vtWholeWord;
vtWholeWord.vt = VT_BOOL;
if ( bWildCard )
vtWholeWord.boolVal = FALSE;
else
vtWholeWord.boolVal = TRUE;
Selection m_oSel;//selection class
m_oSel = m_oApp.GetSelection();
m_oSel.SetStart(0);
//Finf m_oFind
m_oFind = m_oSel.GetFind();
//here s the FIND method - one you want...
if(m_oFind.Execute( &vtFind, covFalse, &vtWholeWord, &vtWildCard, covOptional, covOptional,
covTrue, COleVariant( (short) 1 ), covOptional, &vtReplaceWith, &vtReplace, covOptional,
covOptional, covOptional, covOptional ) )
{
_variant_t vtUnit((long) 4);
m_oSel = m_oApp.GetSelection();
//Range m_oRange - Range Class
m_oRange = m_oSel.GetRange();
m_oRange.Expand(&vtUnit);
m_oRange.Select();
csValue = m_oRange.GetText();
hope that now you got the idea..
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
Hi,
I have a Win32 Application with me. The application runs with suppporting dll files.I want to call the application(.exe) from FLASH program . I have put all the files in one directory. But I am unable to call the application. Do I need to add something else also. Please guide me.
Regards,
Abhijit
|
|
|
|
|
You can use the flexbrige library!
It's open source!
http://blog.csdn.net/laiboy
|
|
|
|
|
Hi,
I have a Win32 Application with me. The application runs with suppporting dll files.I want to call the application(.exe) from FLASH. I put all the files in one directory. But I am unable to call the application. Do I need to add something else also. Please guide me.
Regards,
Abhijit
|
|
|
|