|
Hi,
How can I remove the project list on the Startup page?
Thanks,
|
|
|
|
|
Is it possible to open and access/process information in cemapi.vol? or is there any other way to read sms that is already received in phone?
|
|
|
|
|
KongHL wrote: Is it possible to open and access/process information in cemapi.vol? or is there any other way to read sms that is already received in phone?
i am not sure, but i get the feeling that u have asked the question in wrong forum.
vijay.
|
|
|
|
|
Hi,
I want to develop a multi-language application, so I want to use dlls that containg a string table to support multiple locales.
Anybody knows how to export a string table from a DLL??
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
|
There's no "exporting" involved (that term doesn't even apply in this situation). You load the DLL with LoadLibrary() and use the returned HINSTANCE to load resources from it.
|
|
|
|
|
void CNoteDlg::OnSalveazaCr()
{
CWaitCursor wait; // Display a wait cursor
for(int i=0; i {
if(m_list.GetCheck(i))
{
CString sTemp,sTemp1,sTemp2,sTip1,sTip2,sTest1,sAnul1,
sLuna,sLuna1,sZiua1,sData;
CMainSpace *pMainSpace = new CMainSpace;
pMainSpace->m_sTextDatabase.Empty();
pMainSpace->m_sTextDatabase1.Empty();
pMainSpace->m_sTextDatabase2.Empty();
pMainSpace->m_sTextDatabase3.Empty();
m_cod.GetWindowText(pMainSpace->m_sTextDatabase);
pMainSpace->m_sTextDatabase.TrimLeft();
pMainSpace->m_sTextDatabase.TrimRight();
m_nrNota.GetWindowText(pMainSpace->m_sTextDatabase1);
pMainSpace->m_sTextDatabase.TrimLeft();
pMainSpace->m_sTextDatabase.TrimRight();
m_datanota.GetWindowText(sLuna1);
m_datanota3.GetWindowText(sZiua1);
m_datanota1.GetWindowText(sAnul1);
pMainSpace->m_sTextDatabase3 = m_list.GetItemText(i,22);
pMainSpace->m_sTextDatabase2 = sLuna1 + "/" + sZiua1 + "/" + sAnul1;
CDatabase_Note pBun;
pBun.m_strFilter="note1="+ pMainSpace->m_sTextDatabase;
pBun.m_strFilter="note2="+ pMainSpace->m_sTextDatabase1;
pBun.m_strFilter="note3="+ pMainSpace->m_sTextDatabase3;
pBun.Open();
pBun.Edit();
while (!pBun.IsEOF())
{
int nIndexA = pBun.m_note1.Find(pMainSpace->m_sTextDatabase);
int nIndexB = pBun.m_note2.Find(pMainSpace->m_sTextDatabase1);
if ((nIndexA != -1) & (nIndexB != -1))
{
pBun.Edit();
pMainSpace->m_sTextDatabase3 = m_list.GetItemText(i,22);
pBun.m_note2 = pMainSpace->m_sTextDatabase3;
pBun.Update();
pBun.Close();
delete pMainSpace;
break;
}
}
m_list.DeleteItem(i);
i--;
}
}
}
this is my code ... but somethig is wrong because it say SQL: Statement too long ! what can i do ?!
please help me !
i will wait your answer !
because i dont have one !
-- modified at 8:32 Monday 18th December, 2006
-- modified at 8:33 Monday 18th December, 2006
Bravoone
|
|
|
|
|
Hi friend!
Instead of putting title as please help me, please try to keep related right title for your question. Then you could get the answer as soon. Please never mind as I am pointing out you. Just I like to tell you as a friend in code project.
and please try to put what is your expectation (Expected output) from this code try to write that. Please try to keep your code between <pre> your code... ... </pre> tags.
With Thanks & Regards.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello Friend
I want some help regarding Multi-lingualapplication.
Plz help me out.
I can create and set Keyboard layout for diff diff lanuages but how to get a text and how strlen and such operation perform on them????
thanking you!!!
|
|
|
|
|
Hello,
i have a problem with this funktion to read a key from the registry!
This confusing me, becouse this function fails only in release version, newer in debug version!!
Does any one have an idea for me why that occurs??
I like to read this regkey and schow them i CStatic field on my dialog, thats all!
regards
break;
|
|
|
|
|
break; wrote: becouse this function fails only in release version
What type of failure is this? Can you show code ?
|
|
|
|
|
Hello prasad,
they are no errors to shown, nothing, i say, in debug version works, not in release, ok here is my code:
<code>
TCHAR acData[10000];
DWORD type = 0;
DWORD SizeOfBuffer;
if (ERROR_SUCCESS != RegQueryValueEx(hKey, csValueName, NULL, &type, (PUCHAR)acData, &SizeOfBuffer))
{
RegCloseKey(hKey);
AfxMessageBox(L"Error reading registry!");
return ;
}
modify:
i change that code to:
<code>
TCHAR acData[10000];
unsigned char acChar[10000];
DWORD type = 0;
DWORD SizeOfBuffer;
if (ERROR_SUCCESS != RegQueryValueEx(hKey, csValueName, NULL, &type, acChar, &SizeOfBuffer))
{
RegCloseKey(hKey);
AfxMessageBox(L"Error reading registry!");
return ;
}
wcscpy(acData, ( const TCHAR*) acChar);
and now i have that keyvalue from the registry...
I dont know why that func dont work with TCHAR array, or how to call this func with an TCHAR array?
regards
break;
-- modified at 7:11 Monday 18th December, 2006
|
|
|
|
|
lpType of RegQueryValueEx expects LPBYTE , because its value is determined based on type of registry value. So always use same value.
|
|
|
|
|
hello,
thank you very much, i change it to LPBYTE!
with best regards
break;
|
|
|
|
|
The most likely cause is that you failed to initialize your SizeOfBuffer before calling RegQueryValueEx. In debug, that value is probably initialized to something like 0xcccccccc, but in release, since it's on the stack, it's probably 0.
The last parameter to RegQueryValueEx is an in/out parameter and tells the function how big your buffer (acChar) is. In this case, you should initialize it to 10000 since that's the size of your buffer.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
|
Let me try my mind-reading capabilities... Hum...
Your code is lacking initialization of your local variable(s).
How's that for an average mindreader (as myself)?
If the mind-reading didn't work out, please give us more information.
Such as source code, error message e.t.c.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Whenever i debug the program i got this error when it comes to dll function..i am able to load dll lib and able to link.....can anybody help me to point out the problem where i m amking big mistake....thanks for your time and support....
Dll function: short setQuoteToDB(
BSTR* strDateTimeStamp,
short* intMarketNo,
BSTR* strMarketName,
BSTR* strBid,
BSTR* strAsk,
short* intMarketState);
typedef int (CALLBACK* Set_Quote_DB)(unsigned short**,
short*,
unsigned short**,
unsigned short**,
unsigned short**,
short*);
void CArielProjectVer2Dlg::OnPriceChangeArielapictrl1(LPCTSTR SessionId,
LPCTSTR RequestId,
short MarketNo,
LPCTSTR Market,
LPCTSTR Bid,
short BidDirection,
LPCTSTR Ask,
short AskDirection,
LPCTSTR High,
LPCTSTR Low,
short MarketState,
LPCTSTR Timestamp)
{
SessID=SessionId;
CurrentRequestId=RequestId;
marketno.Format("%d",MarketNo);
bid_d.Format("%c",BidDirection);
ask_d.Format("%c",AskDirection);
marketstate.Format("%d",MarketState);
m_MainEdit= SessionId + RequestId + marketno ;
m_MainEdit= Market + Bid + bid_d + Ask + ask_d + High ;
m_MainEdit=m_MainEdit + Low + marketstate + Timestamp ;
UpdateData(FALSE);
iLineCount=m_EditCtrl.GetLineCount();
m_EditCtrl.LineScroll(iLineCount);
HINSTANCE hInstance = AfxLoadLibrary("C:\\ActiveXdll\\WartzODLCOM.dll");
if(hInstance != 0)
{
MessageBox("load dll");
USES_CONVERSION;
BSTR bsTimeStamp = A2BSTR(Timestamp);
BSTR bsMarket = A2BSTR(Market);
BSTR bsBid = A2BSTR(Bid);
BSTR bsAsk = A2BSTR(Ask);
Set_Quote_DB SetQuote;
SetQuote = (Set_Quote_DB)GetProcAddress(hInstance,"setQuoteToDb");
if(SetQuote != NULL)
{
SetQuote(&bsTimeStamp,&MarketNo,&bsMarket,&bsAsk,&bsBid,&MarketState);
return;
}
SysFreeString(bsTimeStamp);
SysFreeString(bsMarket);
SysFreeString(bsBid);
SysFreeString(bsAsk);
FreeLibrary( hInstance );
return;
}
|
|
|
|
|
pls help...another VC++ newbie here.
i tried to return string values from this particular dll im workin on thru BSTR. this return value shall be recievd by a VB application
this DLL im workin on is not a MFC dll but a win32 dll.
using the code block below...i tested if i could really
return a string thru BSTR, and it worked jst fine.
BSTR Message;
char *buff = "This works fine" ;
Message = SysAllocStringByteLen (buff , lstrlen(buff));
return Message;
but when i tried to return the values im really supposed to return ....i cant find a way to make it work.the program/dll must return the values of an array of unsigned char[].
heres what i did.
BSTR Message;
unsigned char vst[121];
vst[0] = 0x00;//these are the kind of values i expected it to return
vst[1] = 0x17;
vst[2] = 0xFF;
..
..(and so on..)
vst[20] = 0xFF;
CHAR theChar;
CHAR* pChar = &theChar;
res = VarI1FromUI1( GETvst[10],pChar);
Message = SysAllocStringByteLen (pChar, lstrlen(pChar));
return Message;
The code above shouldve returned the converted values of array GETvst[10] but only resulted wierd values i cant understand...i should be returning the values of array GETvst[10] to GETvst[16]....
ive read a lot of article abt this problem but cant find the solution
thnx in advance gurus
|
|
|
|
|
dekta wrote: BSTR Message;
char *buff = "This works fine" ;
Message = SysAllocStringByteLen (buff , lstrlen(buff));
return Message;
In the above code snippet is clear what you intend to do.
Below I'm not able to follow you anymore
dekta wrote: CHAR theChar;
CHAR* pChar = &theChar;
res = VarI1FromUI1( GETvst[10],pChar);
Message = SysAllocStringByteLen (pChar, lstrlen(pChar));
return Message;
What is GETvst[10] and what exactly do you want to do?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
pls help...another VC++ newbie here.
i tried to return string values from this particular dll im workin on thru BSTR. this return value shall be recievd by a VB application
this DLL im workin on is not a MFC dll but a win32 dll.
using the code block below...i tested if i could really
return a string thru BSTR, and it worked jst fine.
BSTR Message;
char *buff = "This works fine" ;
Message = SysAllocStringByteLen (buff , lstrlen(buff));
return Message;
but when i tried to return the values im really supposed to return ....i cant find a way to make it work.the program/dll must return the values of an array of unsigned char[].
heres what i did.
BSTR Message;
unsigned char vst[121];
vst[0] = 0x00;//these are the kind of values i expected it to return
vst[1] = 0x17;
vst[2] = 0xFF;
..
..(and so on..)
vst[20] = 0xFF;
CHAR theChar;
CHAR* pChar = &theChar;
res = VarI1FromUI1( vst[10] ,pChar);
Message = SysAllocStringByteLen (pChar, lstrlen(pChar));
return Message;
The code above shouldve returned the converted values of array GETvst[10] but only resulted wierd values i cant understand...i should be returning the values of array vst[10] to vst[16]....
ive read a lot of article abt this problem but cant find the solution
sorry for my previous typo errors gurus
|
|
|
|
|
the following code works (though I cannot figure why do you want to do this kind of stuff...)
DLL side:
extern "C"
{
VARIANT WINAPI MyString(void)
{
unsigned char vst[21] =
{
0x00, 0x17, 0xFF, 0x00, 0x17, 0xFF, 0x00, 0x17, 0xFF, 0x00,
0x00, 0x17, 0xFF, 0x00, 0x17, 0xFF, 0x00, 0x17, 0xFF, 0x00,
0x00
};
OLECHAR olec[21];
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, (LPCSTR)&vst, 21, (LPWSTR) olec, 21);
VARIANT vt;
VariantInit( &vt );
vt.vt = VT_BSTR;
vt.bstrVal = SysAllocStringLen(olec, 21);
return vt;
}
}
VB side:
Private Declare Function MyString Lib "DllString" () As Variant
Private Sub Form_Load()
Dim n As Long
Dim p
p = MyString()
For n = 1 To Len(p)
Debug.Print Asc(Mid(p, n, 1))
Next
End Sub
and finally, the output (Immediate Window)
0
23
255
0
23
255
0
23
255
0
0
23
255
0
23
255
0
23
255
0
0
I have used VARIANT type to encapsulate the string because Visual Basic makes some kind of translation over the strings whenever it passes to Windows-Like API exported by DLLs.
Hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello everyone!! i am transfering a large amount of data to a FTP server. in the process, if the FTP connection goes down, how can i detect the connection loss???
vijay.
|
|
|
|
|
Hi,
Check socket handle - usually it's not valid any more. You didnt write what do you use.
-----------
Mila
|
|
|
|
|