|
This sounds like a kind of race condition to me. Are you accessing this map from two separate threads ? If yes, make sure that you protect the map against concurrent access (with a critical section for instance). The problem might appear because two threads access the map at the same time, so the map is in an invalid state for one of the thread.
|
|
|
|
|
Hi Cédric Moonen,
Thank you for the response.
This Map is completely used by one thread but still I want to implement your suggestion and test it.
If you notice the MFC42.dll calls, there is something strange. I'm not understanding why CMapStringToString class's GetAssocAt() is called. It is supposed to call CMapStringToPtr class method.
thanks,
Mallik
|
|
|
|
|
HI All,
I have one ocx control developed in vc++/mfc and later the same code has been modified to use in automation server..now the problem is we need to keep separate clsid for the ocx control for server to avoid any conflict but its not changing the clsid even after changed in odl file..
Please show the right way to do this.
Thanks..
SoftwareDeveloper(.NET)
|
|
|
|
|
How do you know that (I'm assuming you've succesfully built the component with the new CLSID )?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Checked in the registry and found another folder with different name and same clsid..
using regedit.
Thanks..
SoftwareDeveloper(.NET)
|
|
|
|
|
Cannot you find the new CLSID in the registry?
Have you changed the interface name? Cannot you use the Oleview tool?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In ADO DB when should be a value converted to _bstr_t or _variant_t anf why ?
modified on Tuesday, May 19, 2009 12:51 PM
|
|
|
|
|
when: when you need a BSTR or a VARIANT
why: because you need a BSTR or a VARIANT
|
|
|
|
|
How do i insert a recordset where i take parameters from the user.
User enters his values in editboxes and when he hits "insert" button a query is fired
insert into table1 values (editboxvalue1, editboxvalue2 , editboxvalue3 , editboxvalue4 );
For this i can take values from editbox with the GetWindowText() method and store it in some variable .
but how should the query look like ,and should i use Connection::Execute() or Command::Execute() for this.
I have been using Connection::Execute( ) to Insert ,Update and Delete a recordset.
For queries with parameters which is a better choice ???
And how to form a insert query to insert values from user,into DB ???
|
|
|
|
|
vital_parsley2000 wrote: how should the query look like
INSERT INTO table1 VALUES (?,?,?,?)
vital_parsley2000 wrote: should i use Connection::Execute() or Command::Execute
Command::Execute, after appending a suitable number of parameters[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Could you help me with a link of this example where this insert is shown w/o using CADORecordBinding class.
|
|
|
|
|
Why - does Google not work for you? That's how I find these links.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
How can I load/insert an existing bitmap to the existing main application Toolbar? I do see where I can draw/Edit a new bitmap, but I have a bitmap that I downloaded from somewhere and I need to load that instead? How is this done usually?
Thanks
sft
|
|
|
|
|
One way is to simply copy it over the existing toolbar.bmp file. If it's already sized correctly, you're good to go.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks, I think I did that...I noticed the bitmap I am trying to copy has a different bit depth, like way off than the rest of the bitmaps for the toolbar...Would this be a reason to make it fail?
sft
|
|
|
|
|
Software2007 wrote: Would this be a reason to make it fail?
Fail as in none of the buttons work, or just looks funny?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
No, as in my copy method is not doing the trick. I opened the toolbar in Resource Editor and tried to copy over the bitmap, but no success. Am I doing wrong?
sft
|
|
|
|
|
Software2007 wrote: Am I doing wrong?
Yes. Use Windows Explorer.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
It isn't working...In Explorer, I browse to where the bmp(s) are, I have Toolbar.bmp and MyBitMap.bmp, I tried opening toolbar.bmp and copying Mybitmap over it, also, just tried drag and drop without opening...I must be missing something, becasue i wouldn't think it would copy the bmp file over another file (the Toolbar.bmp has the image of the tollbar bitmaps, but not editable obviously)...What do you think am doing wrong?
Thanks
sft
|
|
|
|
|
Can't you just delete toolbar.bmp and rename MyBitMap.bmp to toolbar.bmp?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I got this error RC2170 : bitmap file res\Toolbar.bmp is not in 3.00 format when I renamed...I don't know how I would convert to this format. Do you?
sft
modified on Tuesday, May 19, 2009 2:05 PM
|
|
|
|
|
The bitmap must be redrawn or converted to 3.x format. You might check to see if Paint (mspaint.exe) will do this for you.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
The variable m_sDate2 of class CString
contains 14.06.1955
How to set value variables
int year, month, day;
CString s; ?
Have been show below attempts was failure:
//+ MessageBox(L"61.\nm_sDate2 = " + m_sDate2);
// _tscanf((LPCTSTR)m_sDate2, "%d.%d.%d", &day, &month, &year);
//1.++- s.Format(L"62.\nday = %d\n,month = %d\n,year = %d\nm_sDate2 = %s", &day, &month, &year,m_sDate2);
day = 1234628 ,month = 1234640 ,year = 1234652 m_sDate2 = 27.03.1965
//2++- s.Format(L"62a.\nday = %d\n,month = %d\n,year = %d\nm_sDate2 = %s", day, month, year,m_sDate2);
// 62a. day = -858993460 ,month = -858993460 ,year = -858993460 m_sDate2 = 27.03.1965
//3++- _tscanf((LPCTSTR)m_sDate2, "%d.%d.%d", day, month, year);
// 62b s.Format(L"62b.\nday = %d\n,month = %d\n,year = %d\nm_sDate2 = %s", day, month, year,m_sDate2);
//4++- _tscanf((LPCTSTR)m_sDate2, L"%d.%d.%d", day, month, year);
//5++- wscanf(m_sDate2, L"%d.%d.%d", day, month, year); // пусто
//6++- wscanf(m_sDate2, "%d.%d.%d", day, month, year); // пусто
//-7 scanf(m_sDate2, "%d.%d.%d", day, month, year);
//-8 scanf((LPCTSTR)m_sDate2, "%d.%d.%d", day, month, year);
//-9 scanf((LPCTSTR)m_sDate2, "%d.%d.%d", &day, &month, &year);
//-10 scanf(m_sDate2, "%d.%d.%d", &day, &month, &year);
//- swscanf((LPCTSTR)m_sDate2, "%d.%d.%d", day, month, year);
//- swscanf((LPCTSTR)m_sDate2, "%d.%d.%d", day, month, year);
//- swscanf((LPCTSTR)m_sDate2, "%d", &day);
//- swscanf(m_sDate2, "%d", &day);
_tscanf((LPCTSTR)m_sDate2, "%2d.%2d.%4d", &day, &month, &year);
s.Format(L"\nday = %d\n,month = %d\n,year = %d\nm_sDate2 = %s", &day, &month, &year,m_sDate2);
MessageBox(s);
|
|
|
|
|
|
I'm not sure if you've looked at COleDateTime[^] class.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|